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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manikavelu VelayuthamRank #413 · 6K reputationPosted Dec 8, 2010, 12:51 AM EST
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 ?
VEERA sekhar32 reputationPosted Dec 8, 2010, 1:20 AM EST
Manikavelu VelayuthamRank #413 · 6K reputationPosted Dec 8, 2010, 1:32 AM EST
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 sekhar32 reputationPosted Dec 8, 2010, 2:54 AM EST
AL MUBARAK86 reputationPosted Dec 9, 2010, 1:15 AM EST
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
Manikavelu VelayuthamRank #413 · 6K reputationPosted Dec 9, 2010, 1:21 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Dec 9, 2010, 7:41 AM EST