Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to: get rid of __doPostBack from link buttons?

for example:

this code:

<asp:LinkButton ID="SignInLinkButton" runat="server" CssClass="SignInLinkButton" TabIndex="3" OnClick="AuthorizeUser">SignIn</asp:LinkButton>

shows this as link in status bar:

javascript:__doPostBack('ctl00$ctl00$GlobalPageContentPlaceHolder$ManagePageContentPlaceHolder$SignInLinkButton','')

is there a chance o get rid of this ugliness? or is there a better way of doing this, that does not generate this insanity?

i searched, but did not find an answer, so links are also cool. thnx

like image 972
b0x0rz Avatar asked May 28 '10 15:05

b0x0rz


2 Answers

Displaying Text in the Browser's Status Bar When Mousing Over a LinkButton

Basically you need to add onmouseover="window.status='text to display in status bar'; return true;" and onmouseout ="window.status=''; return true;" to the link. The article shows you how to do it, and even makes a custom control for you.

Alternatively, you can style a button to look like a link (if you just want to get rid of the text).

Here's one example of doing it, but there might be other methods.

like image 129
Greg Avatar answered Oct 28 '22 04:10

Greg


Do what Greg says, but also rename your contentplaceholders to make them smaller.

Those long names are prepended to the name of each control on the page. They take up bandwidth unnecessarily when you have a lot of controls.

I always name mine 3 letters long.

like image 25
Ed B Avatar answered Oct 28 '22 04:10

Ed B