Web Forms :: Folders Name That Default.cs Located In?
Jul 1, 2010
I have created a Folder and inside this folder, I have put a default.aspx and a default.cs file. I wonder how it is possible to find out what is the folders name as the default.cs is located in. This meens that I am looking for a code to determine what folder that is above in the hierarchy of folders?I cant use this code as this goes all the way back to the root:
I wonder how it is possible to retreive the Folder name in which the file default.cs is in. I do my coding in this default.cs file and will simply retreive the name of the folder that this file is in. If I remember correct Resolve URL could be used to do this in any way but dont really remember how to do this in C#?
I have a gridview which displays thumbnails in the first column and details in the other columns. The thumbnail URL is being retrieved using the following:
[Code]....
However, if the thumbnail cannot be located, a white box with a cross appears instead (as expected).
To handle this better, I would like to display a different image if the thumbnail cannot be located for any reason, for example an image saying "Image Cannot Be Displayed". But I am unsure of how to do this, of even where to do this. Essentially I need to assess the value that the datagrid is using for the particular URL when it is databound. But can I put VB.NET code in this?
[URL] (goes to the it's local default.aspx page, not default.aspx of at the root) [URL](goes to the it's local default.aspx page, not default.aspx of at the root) [URL] (goes to the root's default.aspx page) I hope i could tell my question understandable.
I want code in VB.NET to create javascript arrays of the folder contents that can then be used on the client end. I only need arrays for all folders contained in folders starting with ad_ and an array for all the base folders . like so:
var folders=["ad_folder","ad_code","ad_prep","ad_bin"]; var ad_folder=["folderA","folderB","folderC","anotherFolder","etcfolder"]; var ad_code=["folderA","folderB"]; var ad_prep=["folderA","etcfolder"]; var ad_bin=["etcfolder"];
note that I do not know the number of or the names of the folders, they can be different in different cases, I only have the root path.
I have used a lot, in my application, the code below in order to access a Panel located in MasterPage.
CType(Master, MasterPageName).Panel1()
But, right now I need to do the same command above, in a page located within an iFRAME. The parent page (that calls the iFrame) is normally using that MasterPage. But the iFrame isn't.
I am developing a web app which uses images. Because there are lots of images, I decided to store them in a location out of the web site, maybe they can reside in a different unit (g:Pictures for example, where g: is a drive that belongs to a disk array which is part of the web site infraestructure).
At the beginning, such pictures were saved in a folder within the web site project so it was easy to show them using the asp:image control's ImageURL property but now that they are outside, things get complicated.
I am quite to this and have a question regarding tools... I have two .aspx pages, one has an .AJAX timer and the other one does not. I need to able to set that timer interval (not to send, but to set it!) from the other page, the one that does not have it. Is this possible in ASP.NET?
I have an iframe in one of my aspx files which is located in folder1.
I have a line of code in my page iframe1.Attributes.Add("src","filename.aspx");
The filename.aspx file is in folder2, so the above line throws an error..... The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.Requested URL: /folder1/filename.aspxso, its basically looking for the filename.aspx only in folder1, how can I make it point to the other folder. I tried iframe1.Attributes.Add("src","folder2/filename.aspx"), but its of no use.
the default ASP.NET Forms Authentication cookie sets it's name as ".ASPXAUTH". Notice the first character is a period? Is there a particular reason for this? Like, does this have an impact on domain names or subdomains for the target domain.
Or is it purely some random thing an MS dev person came up with (maybe to help out the ordering of the cookies, when they were debugging or something .. as text with periods prolly get listed before other strings)?
I wish to add a sub to vb file that changes the display value of several asp:panels located in a Formview Item Template. My only question is what is the proper event to run this in. (databound, item created etc...) If it matters this formview appears in a Gridview Item Template.
I have an ASP.NET website with two different sections, root website and an /Admin sub-folder. I want to have two different forms authentication/login pages for them. /Admin folder should use/redirect /Admin/Login.aspx and root pages should use /Login.aspx. What should I do in web.config to accomplish this?
How can I display Windows XP 32-bit folders in a web page as TreeView e.g.:
C:LibraryLawsLaw1law1.doc
Then I can press on the link to open a word document.
End users create folders and place Word documents inside , and the web page reads the folders and display it as TreeView and allow end users to open Word documents.
i have a master page in a root and some pages in root and works perfectly, but now i need a different folder (secure) and in this folder i have an Admin page but doesnt show icons from master, only the placeholder. If i change the url from .css (url('images/page-bgglare.png') to (url('../images/page-bgglare.png') works the pages inside the folder but doesnt works the pages in root.
I have an asp.net app that allows users to create personal pages which can be publicly accessed thru a "directory" page. The content of the pages is stored in sql server, so a given user's page is dynamically created thru the code that executes when the relevant link on the directory page is clicked.
I would like to take this a step further by allowing access to a given user's page directly thru the browser's address bar, something likewww.thegreatestsite.com/jim (pretty much like You Tube, Facebook, etc.).
I could achieve this by manually creating a folder under the root, called "jim" and put a default.aspx page in it which has the code in it's load event that would dynamically create jim's page.
However, I would like this "additional feature" to be created automatically, as part of the sign up process of the user.
I have no clue as to what would be the best approach. For all I know there might even be a standardized way to ado this in asp.net?
I would like to display a list of all the Themes in the App_Theme directory and allow the user to select the theme they would like to use. Is there already a method that would return the folder name back to me in the app_theme folder?
The problem is as follows: If a visitor try to access a page in Admin folder he must be redirected to login page located in Admin folder, here I will take his username and password and then I will check this in SQL Server table, if he is authenticated then he will be redirected to Default page and he can access any page in Admin folder, but not any page in User folderHere is one thing is important and that is login page in Admin folder and login page in User folder are differentSame scenario is for User folder Please tell me what is the right way to achieve this functionality
I am going to be displaying folders and files in a tree stucture although i need to user todecide what folders they want to view by putting in a path, can this be done? When the user finds the file, they are going to bepresented with an option to move or delete the file. Should i use another tree stucture or an input box to allow the user to put the path