I have a page with name Default.aspx, on Default.aspx I have Property
protected string pageNo = string.Empty;
public string PageNo
{
get { return pageNo; }
set { pageNo = value; }
}
and second page is myPage.aspx have the similar property. Now I want to access the Default.aspx page property on the myPage.aspx or assign it in the myPage.aspx page's property. Is it possible if yes then how to do?
you are doing cross page posting. you can use page.PreviousPage. It needs from asp.net 3.5 or after.
No, it is not possible. By the time MyPage.aspx is executing, Default.aspx has been garbage collected. Your options are Session variables, Url parameters, ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With