2

Is there a way prevent an ASP gridview from always relying on javascript for the edit and delete LinkButtons? If I disable javascript in my browser the edit and delete commands still seem to link to "javascript: _doPostBack". (I'm using VB and .NET framework 2.0)

Thanks in advance.

2 Answers 2

2

You could implement the edit and delete buttons yourself using an <asp:TemplateField>. Then you are free to have them do the postback however you like, with <input type=submit> buttons, perhaps.

Sign up to request clarification or add additional context in comments.

2 Comments

I guessed that if the LinkButtons relied on javascript, submit buttons would also but apparently not! Thanks a lot.
A LinkButton is basically a link <a href=...> that acts like a button by calling some Javascript. Not my favorite control, but they are ok if you are in an environment using JS.
2

You are limited to smaller subset of controls when Javascript is not available. See MSDN. The postbacks function conveys to the runtime what was clicked and that is how the server side events are triggered. If you really want to develop an app without Javascript support, you will have to stay away from most server controls. The rendering is fine but any interaction (like editable grid) would be one of those controls to stay away from. You might also want to look into ASP.NET MVC framework.

1 Comment

Thanks for the information, unfortunately I'm stuck with the .NET framework 2 and asp controls (school project with certain limitations). I have worked with MVC3 before and switching back to plain ASP controls feels like a step back in time :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.