Set LinkButton from MasterPage as default button on the page.
-
On my web form,I have applied a MasterPage,which contains a user control. This user control in turn contains a link button. I want to set this link button as the default button on my web form. I found 1 free dll on internet which gives this method : - DefaultButton.SetDefaultButton(textboxControl,ButtonControl); But this method, somehow, does not allow link button (only Buttons & ImageButtons are allowed). Please Help. Thank you :) .
-
On my web form,I have applied a MasterPage,which contains a user control. This user control in turn contains a link button. I want to set this link button as the default button on my web form. I found 1 free dll on internet which gives this method : - DefaultButton.SetDefaultButton(textboxControl,ButtonControl); But this method, somehow, does not allow link button (only Buttons & ImageButtons are allowed). Please Help. Thank you :) .
Have you tried the
DefaultButton
property? Something like<form id="form1" runat="server" defaultbutton="yourLinkButton">
Navaneeth How to use google | Ask smart questions
-
Have you tried the
DefaultButton
property? Something like<form id="form1" runat="server" defaultbutton="yourLinkButton">
Navaneeth How to use google | Ask smart questions
Yes,I have tried this in a separate sample project & it worked.But I am confused about ,on which page should I apply this in my project,B'coz here, the link button is inside a user control which is placed on the master page.And this master page is applied to my webform(). I tried this on the user control's
tag,but it din't work. Thank for ur reply. But I still stuck,please help.
-
Yes,I have tried this in a separate sample project & it worked.But I am confused about ,on which page should I apply this in my project,B'coz here, the link button is inside a user control which is placed on the master page.And this master page is applied to my webform(). I tried this on the user control's
tag,but it din't work. Thank for ur reply. But I still stuck,please help.
-
Hey,I got it!! :) I took all the required controls inside a panel,and then set its property defaultButton to a button(say "Button4"), made it invisible and called linkbutton's Clink Event on Button4_Click. Seems simple. Thanks a lot... :-D
That was tricky. But I assume you can use the same button and change it's style like a link button by applying some CSS. Then you don't need to hide the button.
Navaneeth How to use google | Ask smart questions
-
That was tricky. But I assume you can use the same button and change it's style like a link button by applying some CSS. Then you don't need to hide the button.
Navaneeth How to use google | Ask smart questions
Yeah,I had tried that earlier.But then it was giving a diferent effect to the viewer and since there are other link buttons too,so all of them should look alike.That is why,I had do it like this. But anyways,Thanks a lot for your immediate responces. :)