In .net forms are supposed to post back to themselves. If you want a form that posts infomration to another page you need to do something like add a button action that then redirects to another page and sends the data there
If you redirect then how is the data sent? It would be a pain to use the querystring. If I have a large for or search criteria and I want the data to be passed to another page then it seems unrealistic.
I guess I am not really sure why you would want to send a large chunk of data to another page. The best way would be to store it in a database or xml file on page 1, then redirect with the record id to page 2 and retrieve the data.
Not a large chunck, but say 4 items of search criteria. In Classic ASP you just posted the form and did a Request.Form("myData"). I want to display search results on a different page. Storing in a database would mean 3 trips to it.<BR><BR>Do you populate properties in the code behind class<BR>and create an instance of that class in the code behind class of the new<BR>page to access it's properties?<BR><BR><BR>
what we are saying is that you don't have to have a second page anymore for the results of your query. It doesn't really make alot of sense to have a page with your request form then a page with the resutls to a bound datagrid or something. The best design is to have two panels on your page. Hide your results panel unless you have a postback. If you do then show your results panel.
I understand that completely. What about a registration form that uses a few panels already? There will be a lot of code in one class and .aspx page. I was just thinking of trying to keep things neat. Also, if you want to edit a record, but would like to pass it's ID in a hidden field as oppossed to a querystring variable you can't? It wouldn't seem useful to use a session variable if it is only used there. A page could get very crowded with code.
In your Submit buttons onclick event, server.transfer to the page you want. then within that page you can use the request.form the same way as in asp ... <BR><BR>I suggest if you are still confused you go through some tutorials at http://www.asp.net ... this is pretty fundemental stuff and by the sounds of your questions you have not informed yourself enough by reading and looking at examples to be developing in asp.net (or rather asking for help on something you can read up on in minutes).<BR>