Issues with form submission during Asp.net development and rough solutions

Source: Internet
Author: User
There are form1.apsx and form2.aspx, and form1.aspx contains "textbox1" and "textbox2" and a "command1" control.
If you set the action in form1 to form2.aspx (to convert it to form2.aspx after it is submitted through command1), add processing in the oncommand1_click () function. CodeIt makes no sense, because when you click command1, the entire page is submitted to the server, and the server is directed to form2.apsx for processing, and form1.aspx will not be executed at all. the oncommand1_click event in CS. the Processing Mechanism of. NET is not very convenient, but the results submitted to form2.aspx are achieved. You can use request ["textbox1"] and request ["textbox2"] to obtain the corresponding values.
If the action is not set, after command1 is submitted, it is still processed in form1.aspx, so that it cannot be submitted to form2.aspx, but oncommand1_click () can be executed at this time, this function may be directed to form2.aspx through redirecttomobilepage. There are two methods: Session, parameter in URL, and URL encoding. In the past, direct targeting failed to be obtained using the request, because the page submitted by the request is form1.aspx. However, some devices seem to have poor support for redirecttomobilepage.

I wonder if there are any other solutions?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.