Form submit

Results 1 to 2 of 2

Thread: Form submit

  1. #1
    Join Date
    Dec 1969

    Default Form submit

    Hi,<BR><BR>May be this is a very basic question,but i could not find the answer on FAQ so I am posting it here.<BR>I have a page first.aspx which has a textbox(name=txt) and after I submit I want to set the action to second.aspx where i can retrieve the value contained in txt,as we do in traditional ASP as Request.form("txt").<BR><BR>Can somebody tell me how to accomplish this in,I tried giving action="second.aspx" in the &#060;form&#062; tag,but doesnt seem to work.<BR><BR>Thanks<BR>Harish

  2. #2
    Join Date
    Dec 1969

    Default PostBacks only in server forms

    If you use &#060;form runat="server"&#062;, then the page can only perform a postback to the original page.<BR><BR>You can override this behavior by using a traditional form (without the runat=server statement) AND using a regular &#060;input type=text &#062; textbox. This will let you use Request.Form to access the data in question.<BR><BR> wants you to post a page back to itself. This is similar to the way traditional windows forms work. Whether or not that is the best solution in the web world is a different story.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts