R
Ric Paton
Guys,
Forgive me if I have posted this in the wrong group, it's my first post
and wasn't sure where it should go. If it should be in another group
please let me know.
Right, let me explain my situation.
I am client side developer (js/css/etc) plus I did asp/php server side
stuff. So I know my way about. I'm just starting on the .NET (VB.NET to
be exact) and I have a question about the way the <asp:> controls are
generated client side.
1) function __doPostBack() { }
Can I rewrite this function, it's pretty poor coding and is invalid.
Even the option to put it into an external js file (at least getting it
away from being inline). If so, how do I do this?
2) When adding an element of type "LinkButton" it produces markup like
this.. <a href="javascript:__doPostBack('_ctl1','')">my Link</a> ..which
apart from being shockingly bad markup, it also renders the website
completely inaccessible (due to the reliance of js in the page). I would
like to know how to amend the format that it is outputted as, for
example if I can do this.. <a href="somelink"
onclick="__doPostBack('blah','blah')"> .. instead
I'll leave it at that, I have a lot of questions relating to markup,
accessibility and validation that MS seem to not have thought about when
using the generic controls (I presume the more advanced you get you tend
to build up a library of your own) but an idea on how to solve those 2
questions would be appreciated.
Thanks in advance.
regards,
Ric.
Forgive me if I have posted this in the wrong group, it's my first post
and wasn't sure where it should go. If it should be in another group
please let me know.
Right, let me explain my situation.
I am client side developer (js/css/etc) plus I did asp/php server side
stuff. So I know my way about. I'm just starting on the .NET (VB.NET to
be exact) and I have a question about the way the <asp:> controls are
generated client side.
1) function __doPostBack() { }
Can I rewrite this function, it's pretty poor coding and is invalid.
Even the option to put it into an external js file (at least getting it
away from being inline). If so, how do I do this?
2) When adding an element of type "LinkButton" it produces markup like
this.. <a href="javascript:__doPostBack('_ctl1','')">my Link</a> ..which
apart from being shockingly bad markup, it also renders the website
completely inaccessible (due to the reliance of js in the page). I would
like to know how to amend the format that it is outputted as, for
example if I can do this.. <a href="somelink"
onclick="__doPostBack('blah','blah')"> .. instead
I'll leave it at that, I have a lot of questions relating to markup,
accessibility and validation that MS seem to not have thought about when
using the generic controls (I presume the more advanced you get you tend
to build up a library of your own) but an idea on how to solve those 2
questions would be appreciated.
Thanks in advance.
regards,
Ric.