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.
Related
Using asp.net how would you achieve having the login page on the root of the website so for example, the login page to be on www.helloworld.com rather than having a separate file for the login www.helloworld.com/login.aspx
Does any understand what I am trying to do?
Additional information:
Just to give you some examples, look at this website www.torn.com then look at this one www.mobslife.com.. Notice how the url for the login page is just www.torn.com but on www.mobslife.com it is www.mobslife.com/login.php
If the site uses Web Forms and IIS has the standard set of default pages defined, then you can use file Default.aspx under the root directory of the web site to implement the login form.
I created a sharepoint application in which I added a web app item , but the problem i didn't find the default.aspx page
Once you have the web application, you need at least a site collection to be able to navigate to. Once you create a site collection, every site in it (including the root site) will have a page called Home.aspx - that's the default one for SharePoint, not default.aspx - which you can browse. Also by default, navigating to a site's URL without a page name in the URL will lead you to Home.aspx.
Edit, to answer OP's comment:
i created a new web part in visual studio in order to deploy it in my Sharepoint site. In visual studio , i created an empty sharepoint project in which i added a web part to it , the problem i didn't find the default.aspx page in the project that i created
Web part and visual web part projects don't include pages. You may include a page in a module if you wish, but you will have to create it yourself.
Also, visual web parts are more like user controls than ASP.NET pages. You create these to add to web part zones pages. If you want to deploy pages, you might want to choose another project type.
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>
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"
I am building a silverlight application that needs to have a login page and if the details are correct I need to redirect the user to the actual application. What would be the best way to proceed? This will be my first silverlight app.
I was thinking of having a login page that redirects the user to another page that uses the silverlight navigation framework to switch the content pages after the user has logged in.
Any better way?
Thanks!
May be you need Silverlight Business Application.
Template for this is available on VS 2010.
It has login, register user logics, and have navigations.
It is more secure to encase the security into your outer frame window than view page navigation.
A common approach is to have LoggedIn and LoggedOut states for that view (using the VisualStateManager to change it). The LoggedOut state shows the login panel. The LoggedIn shows your main frame windows.
This way you can reach your site via any URL (assuming deep linking) and still get your security.