question about doPostback javascript function + others

  • Thread starter Thread starter Ric Paton
  • Start date Start date
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.
 
Ric,

Let me start that one of the most major improvements that are done in the
next versions of Net are in the designer of the webpage.

In fact are all serverside controls predefined extended HTML controls or a
complex of HTML controls (or other tags) which you know probably all.

To create from a HTML control a serverside control than is this one of the
ways to do.

<iframe id="midFrame" name="midFrame" runat="server"></iframe>

(And I can tell you that I have as well search long for this simple thing
and found it by just reading a message from somebody (Terry Burns), who was
just answering like me in one of these newsgroups)

:-)

The same as you do I leave it at that.

I hope it helps something

Cor
 
Cor,

Thanks for the reply. I will check out Terry Burns' thread.

However... "...major improvements that are done in the next versions of
Net" is no good for me, I am using VB.NET 2003 and will be for some
time. Microsoft (as part of W3C) shouldn't of overlooked the glaring
mistakes in accessibility/markup/etc.

I don't want to sacrifice my end result because of the inflexibility of
the framework.

But as I say, thank you for the reply.

Ric.
 
Ric
Thanks for the reply. I will check out Terry Burns' thread.
Although Terry lives in the area of the world where the best English is
spoken, has he never long messages. Telling this was the only thing he told
in that thread I saw it.

(Not that he is not able to write nice, I have seen very nice messages and
webpages from Terry). Terry is normally known in these newsgroup as OHM is a
while not active. Probably to busy with his new business.

However searching for OHM will give you a terrible bunch of messages.

:-)

Cor
 
Back
Top