I have created 9 webforms in a project called "PIMS". I have not linked any form together simply because I dont know how to do that. Now when I load and run the application, it presents to me only the form that I have selected to run as "Start Page". How can I link all 9 webforms together present all the forms to users so they can choose the form they want to work on. Please suggest.
Kind regards,
You can link any page or form by tag Anchor
Click Here To Visit Form 2
or any page
Click Here To Visit Page 2
or you can use ASP.NET Controls like HyperLink
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="form2.aspx">HyperLink</asp:HyperLink>
in advance you could use Javascript plugins to make menu with motions and good user experience
for example http://jqueryui.com/menu/
This is for winform only
First form is close and other form is open this way
frmHome frm = new frmHome();
frm.Show();
this.Close();
frmHome is ur another from thats way u can open and close ur all forms.
Related
I Want to create an entire Web-Form on click of a button along with its Code-behind(.cs) file . I can work fairly with Asp.Net but i love to explore new things.just a question that popped up in my mind while working on something new ! So please if anyone of the great minds out there can help please help me out. Thank You.
Instructions for Visual Studio 2013
Open your web solution
In Solution Explorer, right click the web project
Choose "Add Web Form"
Enter a name for the form
Click OK
See also this link
Just extend Web Form class, define properties and methods which will render and show your web form. Handle button click event, initiated web form. Finally display it.
If its normal form you can simply render it using jQuery/JavaScript.
Hope this helps you buddy. :)
I am using C# ASP.net, and relative new to it, and need to accomplish below.
In my VS2010 web application project I have default.aspx, form1.aspx with button1 and form2.aspx.
1-I want to set form1 as my home page (the first page that opens when I run app)
2-Want to open form2 when I click button on form1
Also, can you please suggest good book that covers items like above?
thanks
Jay
Quick start would be to double click the "button1" in designer view, which will generate a button1_click(...) event handler. In this routine, you could write one line of code:
Response.Redirect("~/form2.aspx");
To set Form1.aspx to your "homepage", it would make sense to rename it to "default.aspx" which is usally the page IIS looks for to start from.
hope it helps,
When publishing, in the IIS you have to make the default page the form1.aspx page. In your VS2010 just right click on the file and set it as start page.
Yes, the Response.Redirect answer posted is correct.
I've found that ASP.NET Unleashed is really helpful for beginners. You can find it on amazon:
http://www.amazon.com/ASP-NET-4-Unleashed-Stephen-Walther/dp/0672331128
I'm a newbie of ASP.NET world. I'm developing an app with asp.net and insiede of an aspx page i'm using a window form developed with visual webgui.
I've this problem: inside my form, i have a button wich has to rise an event equals to the page back button of the browser.
I tried to search informations about this, but i can't find anything unfortunately.
I think that i've to do something with the HttpContext. I tried with the Redirect function but my "previous page" is open always in a new browser window.
Can someone tell me a way on how to do this thing please?
Thank's
Marco
EDIT SOLVED
button.RegisterClientAction("history.go( -1 )", "");
Cant you do this:
Response.Redirect(Request.UrlReferrer.ToString());
I am absolutely new to ASP.NET. In WinForms/ VB.NET we can display a form by
form2.show()
In my ASP.NET project, I have created a second webform but don't know how to show it.
How can this be done?
From your code-behind, you can redirect the user to the new page using the HttpResponse's Redirect method:
Response.Redirect("newPage.aspx")
If you want the user to self-navigate to the new page, use a hyperlink server control on your web form:
<asp:HyperLink id="hyperlink1"
NavigateUrl="~/newPage.aspx"
Text="My New Page"
runat="server"/>
You need to link to the second web form using a hyperlink, so in your first webform, having something like this:
My Second WebForm
With a web based programming model, you can't really apply the same programming model.
If you want something to appear as a popup, you could use javascript. I'd recommend taking a look a the jQuery UI Dialog.
Based on your question, I think your best option here is to first go and watch/read some tutorials on using ASP.NET. Programming for the web in a framework like ASP.NET is nothing like working with WinForms, even if you are using the same language (VB.NET). With ASP.NET WebForms they have tried to make the transition easier, but you still need to have a good grasp about how things work in the stateless web world if you really want to be effective. Then you can truly understand the other answers here and WHY you are doing that.
I am building a Web Application using asp.net (C#). I come from windows forms development and find myself in a hard spot. Im making an application where the user should edit some simple information about himself, and thus i need to create a new dialog. How do I do that in asp.net? I have a button which event is handled serverside, and when i click lthis button i want to popup a dialog where i can show my custom web control (or any web control, lets make it generic from the start). How do I go about with doing so?
I got some part of the way by looking at the internet, that i need to make a section and set the z-index to 1000, but how do i make it visible (block)? Please help here as i am completely lost...
/H4mm3rHead
If you're not concerned about using a library, try Microsoft ASP.NET AJAX Control Toolkit, they have several controls that can create something you want (the ModalPopup control).
The AJAX Control Toolkit has a ConfirmButton extender which will do exactly what you are looking for.
I used to do the following:
1. my new pop up is just a new aspx page like any other page
2. add a button (or just a link) that fires a client side java script function
3. in the function I use window.open and put params to open my popup page with no toolbars or scrollbars and proper size to its content
check this for more info on #3