|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Submit
I'm new on this forum and in .NET world<br>I'm trying to learn ASP.NET and I will have some questions.<br>If somebody could help me I'll be greatfull.<br><br>Question:<br>If I try to submit a form located in file1.aspx to a file2.aspx, I set the action attribute for the form tag, but if I set the runat="server" too, submits the file1.aspx to itself and not to file2.aspx.<br>What's happening?<br> <img border="0" src="/forum/emoticons/shocked.gif" height="15" width="15" alt="shocked" /> <br><br>Thanks
|
|
#2
|
|||
|
|||
|
This is part of the .NET design. If you are using runat="server" it will always postback to the same page.<p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>
|
|
#3
|
|||
|
|||
|
And there is no posibility to submit data to another file? <img border="0" src="/forum/emoticons/freaked.gif" height="30" width="18" alt="freaked" /> <br><br>Where is the advantage in this? I see NONE.
|
|
#4
|
|||
|
|||
|
You can submit to another page, but you cannot use the runat="server" if you do. The reason for the design being this way is that the Viewstate stores all of the form information and validation, and can do basic client side form validation for you before posting the actual form.<p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Submit |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|