I am developing a web app in asp.net web forms with master page. Application is running in debug mode in my localhost. When I click on the link in menu it navigates but when I again click on any link in menu it gives me the resource cannot be found.
The problem is a location issue. Make sure you are calling the file in the right directory.
If you are Redirecting from the Server-Side then use
Response.Redirect("~/MyFolder/MyPage.aspx");
or from the Client-Side
href="../MyFolder/MyPage.aspx"
This is assuming that you have the MasterPage in its own folder in the project.
u should try giving the links using ResolveClientUrl,I had the same problem..!!
<a href='<%=ResolveClientUrl("~/Folder/Page.aspx") %>'>LinkName</a>
Related
I am creating a web application in Asp.net and c# where I have a master page in which there is a Left Side Navigation menu containing the links to different web forms. But these web forms are in different locations. For example ClientDetails.aspx and UserDetails.aspx are present at the root and AdminHome.aspx is present in the Admin folder where my master page resides.
So when I click on Client on Navigation menu, it opens nicely but from this place when I click on Admin Home in the nav to redirect back to Admin home page, it gives an error as
The resource cannot be found.
How can I handle this?
When specifying the URL for you pages, it should be in is format with the tilda as shown below:
Client Details
User Details
Admin Home
You will need to check the URL those menu items are redirecting to. Ensure that the relative path for the forms is correct based on current forms location. Take a look at this page to understand how paths work.
I have done some changes(added a button) to Home.aspx page of my vb.net web site.
I have published my website and hosted in IIS.
I could able to see the code for button in my Home.aspx page of my published files.
But when I accessed via URL, I did not get button on my home page.
What could be the issue? I guess the problem would be in IIS. Please suggest some options to try out in IIS.
Problem solved.
While publishing my code in VS, I have unchecked 'Allow this precompiled site to be updated'
I have developed a website in asp.net. It has a menu control.
It is working fine in development environment but not in the production environment.
I have link on menu control to the page called connect.aspx. When I click on this link it's redirected to
http://websitename.com/ErrorPage.htm?aspxerrorpath=/connect.aspx
where as it should be redirected to the below link
http://websitename.com/connect.aspx**
I searched on google but does not getting exact reason behind it.
Please help...
I've got a Silverlight Application which uses forms authentication. I tried to deploy and run it on my new Test-Server but its really weird.
I activated anonymous and forms authentication.
When I run [serverip] I get redirected to Login.aspx (which doesn't exists) and I don't know why.
When I run [serverip]/Default.aspx I get a blank white page. Fiddler shows me, that the Default.aspx page gets loaded, but getting the embedded Silverlight xap File results in a redirect through to Login.aspx.
Does someone have any idea what I'm doing wrong?
I deployed the application via file system. Unfortunately the user "everyone" had no access to the ClientBin-folder. Giving "everyone" access to this folder solved my problem.
I have a(n) (MDI) Windows Form application. It contains two forms. One form (Measured data) controls an engine, another form (laboratory) should show my asp.net web site that has various assignments for the user to do.
How can I show the asp.net default page in that laboratory form? I'm using awesomium to make a browsing window in my laboratory form.
Doing the following
webView.LoadURL("file:///D:/school/4e%20jaar/Erasmus/ErasmusProject/Laboratory/deault.aspx");
gives an error. Probably because the asp.net site isn't online. but how can I run the site so I can see the default.aspx page?
I have on solution with three projects
ErasmusProject
ASP.NET website
SIMOclasses
SIMOForm
The problem is you cannot execute aspx files with file:/// path.
You have to execute on IIS.
So first thing you have to do setup iis if you didnt, create new web site (or use Default Web Site) to execute your aspx files, than change your link file:/// to http://localhost or something.
The URL you've specified looks like its accessing the raw file via the file system. i.e. file:///D:/.../default.aspx.
(You've also misspelt 'default' in your question!)
Can you access that URL from a browser (e.g. IE, Firefox, etc) and see the content you want? I suspect you can't and that you're missing the webserver that is compiling and serving the .aspx pages.
You should host your website first :
WebDev.WebServer /port:9999 /path:"C:\Projects\MyWebSite"