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 an il?
Is asp net front end or backend?
Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?
What are the validation controls available in ASP.NET?
Define the term Scavenging in Caching?
What is the difference between client-side and server-side validations in webpages?
Explain what the contents of cookie?
What is the procedure to create the environment for asp.net? : asp.net mvc
What is the function used for removing an event listener?
How can we make sure that Web API returns JSON data only?
Define the steps to set up validation control.
What is the use of dispose method?
Explain about consistent programming model in the .NET framework?
What are the server control tags in asp.net.?
We are using Jscriopt validations and at clint site javascript is not running that time validation would work? if yes then how it would behave?