If i have a page where i create an instance of a dll and
without invoking any method can I send values to next page ?

Answer Posted / maloy.adhikari

By IsCrossPostback Property we can send values to the next
page..
Exam::
Let There Are 2 Page page1.aspx & page2.aspx.....I wanna
send value of a textbox from page1 to page2.
Step 1::
In aspx of page1,
<div>
<asp:TextBox ID="Textbox1"......></asp:TextBox>
<asp:Button ID="Button1"....postbackurl="~page2.aspx"/>
</div>
Step2::

In Pageload() of page2.aspx

pageload()
{
if(PreviousPage!=null && PreviousPage.IsCrossPostBack)
{
TextBox text=PreviousPage.FindControl("Textbox1")
as TextBox;
if(text!=null)
{
Label1.Text=text.Text;
}
}

}

.........Here Label1 is a label of page2.Where i show the
value of 1st page's text box value....

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain server-side scripting?

576


Explain server-side scripting and client-side scripting.

518


What is a postback ispostback and autopostback in asp net?

481


How do u optimize a query in asp.net?

575


How can you debug your.net application?

560






What is the base class from which web forms are inherited?

529


What is a web api?

555


What is the use of placeholder control?

554


What is the significance of ASP.NET routing?

638


What is preprocessor in .net and type, where it use?

662


What is connection pooling and how to enable and disable connection pooling?

488


Where is session cookies stored?

526


What are the various ways to send content from one page to another?

526


How many types of session in ASP.NET

589


What are the Types of chaching. How to implement caching

564