hai!!!!! frz!!!!control visible false
How to visible false one page control in another page button click event?...help me plz........ ex: lable?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Dec 9, 2010, 12:41 PM
Manikavelu VelayuthamPosted Dec 9, 2010, 6:21 AM
AL MUBARAKPosted Dec 9, 2010, 6:15 AM
HI manicka velu,
Thanks for your sample code. But i cant understand the Hiddenfileds and sourcefileds.? why we put in Hiddenfield and sourcefield names are in code. Is there any default method is there ?
Thanks
H.AL-MUBARAK
VEERA sekharPosted Dec 8, 2010, 7:54 AM
Manikavelu VelayuthamPosted Dec 8, 2010, 6:32 AM
On click of the button, set the hidden field value to 1. Redirect to Page-2.
In page_load of the Page-2, just have the following code.
if (Page.PreviousPage != null)
{
HiddenField SourceField =
(HiddenField)Page.PreviousPage.FindControl("HiddenField");
if (SourceField!= null && SourceField.Value.ToString() == "1")
{
Label1.Visible = false;
}
}
VEERA sekharPosted Dec 8, 2010, 6:20 AM
Manikavelu VelayuthamPosted Dec 8, 2010, 5:51 AM
Through Query String you can do it.
Through Session Variable you can do it & etc.
There were lot of options to achieve it.
Can you explain little more to know the exact scenario ?
I think while redirecting from one page to another on click of the button event, that label should be made visible false, right ?