Enable options according to button click [modified]
-
Hi im actually working on a project. Actually its about storing and retrieving student details from the data base. I hav totally designed 3 webforms. 1st webform has a login form 2nd webform has 3 buttons in it 3rd webform has the grid view which displays the student records frm DB Now heres the problem actually when i click button1 in my 2nd webform it must disable the edit and delete option of my grid view in the 3rd webform and wen i click button2 in 2nd webform it must enable the edit and delete option in my gridview in the 3rd webform. the edit and delete are link buttons. Can anyone plzzz help me its bit urgent... Thashif
modified on Thursday, June 18, 2009 7:08 AM
-
Hi im actually working on a project. Actually its about storing and retrieving student details from the data base. I hav totally designed 3 webforms. 1st webform has a login form 2nd webform has 3 buttons in it 3rd webform has the grid view which displays the student records frm DB Now heres the problem actually when i click button1 in my 2nd webform it must disable the edit and delete option of my grid view in the 3rd webform and wen i click button2 in 2nd webform it must enable the edit and delete option in my gridview in the 3rd webform. the edit and delete are link buttons. Can anyone plzzz help me its bit urgent... Thashif
modified on Thursday, June 18, 2009 7:08 AM
Are they websites or webforms?? :confused:
himanshu
-
Are they websites or webforms?? :confused:
himanshu
-
Man that are webforms not websites
himanshu
-
Man that are webforms not websites
himanshu
-
Hi im actually working on a project. Actually its about storing and retrieving student details from the data base. I hav totally designed 3 webforms. 1st webform has a login form 2nd webform has 3 buttons in it 3rd webform has the grid view which displays the student records frm DB Now heres the problem actually when i click button1 in my 2nd webform it must disable the edit and delete option of my grid view in the 3rd webform and wen i click button2 in 2nd webform it must enable the edit and delete option in my gridview in the 3rd webform. the edit and delete are link buttons. Can anyone plzzz help me its bit urgent... Thashif
modified on Thursday, June 18, 2009 7:08 AM
Can't you keep buttons and gridview on same form?? If not then do something like Session["click"]="button1" // on the click on Button1 Session["click"]="button2" //on the click on Button2 In the page where you have gridview check.. If(Session["click"].Tostring()=="button1") //Disable your gridview link buttons else //Enable your gridview link buttons
himanshu
-
Can't you keep buttons and gridview on same form?? If not then do something like Session["click"]="button1" // on the click on Button1 Session["click"]="button2" //on the click on Button2 In the page where you have gridview check.. If(Session["click"].Tostring()=="button1") //Disable your gridview link buttons else //Enable your gridview link buttons
himanshu
thanx... wel got another code too whch worked out... check dis out... protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("http://Gridview.aspx?ctl=1"); } protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("http://Gridview.aspx?ctl=2"); } Now in de page wer de grid is present Int32 str = Convert.ToInt32(Request.QueryString["Ctl"]); if (str == 1) { //enable de edit button } else { //enable de delete button } Thanx a lot....
-
thanx... wel got another code too whch worked out... check dis out... protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("http://Gridview.aspx?ctl=1"); } protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("http://Gridview.aspx?ctl=2"); } Now in de page wer de grid is present Int32 str = Convert.ToInt32(Request.QueryString["Ctl"]); if (str == 1) { //enable de edit button } else { //enable de delete button } Thanx a lot....
yup same thing.you can either use session or query string
himanshu