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
What is AutoEventWireup attribute for ?
What is diff. Between abstract class and an interface?
What are the advantages of Web API?
What is an asp.net validator? And, mention its types.
What is the difference between table and query?
How Session outproc in Sqlserver stored?
Give a few examples of page life cycle events.
What is session authentication?
How will you maintain versioning in asp.net 2.0?
explain code with datachaching with example
What is a web farm?
Give an example of cookie abuse.
What are the two properties that are common on every validation control?
What is difference between inproc and outproc?
Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?