. Net: seven most classic Asp.net page value passing questions

Source: Internet
Author: User

Question 1:A page: The pagea. aspx webpage contains a textbox ID textbox1 and a button ID button1;
A user control: the webpage of UCA. ascx has a label ID label1. This UCA. ascx is pulled into pagea. aspx.
Enter a value in textbox1 and press button1. Then, the value of textbox1 is passed to UCA. ascx and displayed on label1.
Please writeCodeImplementation!
Question 2: One page: The pagea. aspx webpage has a textbox ID textbox1;
A user control: the webpage of UCA. ascx contains a button ID of button1 and a label ID of label1. This UCA. ascx is pulled
Go to pagea. aspx. Input a value in textbox1 and connect it to button1 on UCA. ascx.
To UCA. ascx and displayed in label1.
Please write code for implementation!
Question 3: A user control: the webpage of UCA. ascx contains a textbox ID textbox1;
A page: The pagea. aspx webpage contains a button ID of button1 and a label ID of label1;
Then, pull the UCA. ascx into pagea. aspx.
Enter a value in textbox1 of UCA. ascx, click button1 on pagea. aspx, and then set the value of textbox1.
To pagea. aspx and displayed on label1.
Please write code for implementation!
Question 4: A user control: the webpage of UCA. ascx contains a textbox ID textbox1 and a button ID button1;
A page: the page of pagea. aspx contains label1 as the label ID;
Then pull the UCA. ascx to pagea. aspx.
Enter a value in textbox1 of UCA. ascx, click button1 on UCA. ascx, and then pass the value of textbox1 to pagea. aspx, which is displayed on label1.
Question 5: A user control: the webpage of UCA. ascx contains a textbox ID textbox1;
One page: The pagea. aspx webpage has a button ID of button1;
A user control: the webpage of UCB. ascx has a label ID label1;
Then, both UCA. ascx and UCB. ascx are pulled to pagea. aspx;
Input a value in textbox1 of UCA. ascx, click button1 on the pagea. ASPX page, and upload the value of textbox1 to label1 of UCB. ascx.
Please write code for implementation!
Question 6: A user control: the webpage of UCA. ascx contains a textbox ID textbox1 and a button ID button1;
One page: pagea. aspx;
A user control: the webpage of UCB. ascx has a label ID label1;
Then, pull both UCA. ascx and UCB. ascx to pagea. aspx.
Input a value in textbox1 of UCA. ascx, click button1 on UCA. ascx, and pass the value of textbox1 to label1 of UCB. ascx.
Use the code to implement it!
Question 7: A user control: the webpage of UCA. ascx contains a textbox ID textbox1;
One page: pagea. aspx;
A user control: the webpage of UCB. ascx contains a button ID of button1 and a label ID of label1;
Then, pull both UCA. ascx and UCB. ascx to pagea. aspx.
Input a value in textbox1 of UCA. ascx, click button1 on UCB. ascx, and pass the value of textbox1 to label1 of UCB. ascx.
Use the code to implement it!

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.