I tried to write my own postback code but I couldnt get the data when
postback occured.this is my simple code:
.....
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft")
> -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
</head>
<body>
<form id="Form1" method="post" runat="server">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<a
href="javascript:__doPostBack('top1$CategoryList1','_Cat,1,project')">click
me</a>
</form>
</body>
</html>
in the code behind I guess I could get values with Request.Form but I
couldnt..can u explain a bit more or may be any links about this would be
great..thanks...
>From: Dean Fiala <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: [AspNetAnyQuestionIsOk] about doPostBack
>Date: Tue, 22 Mar 2005 09:43:29 -0500
>
>The great thing about Javascript is that it is there in your page
>source, and you can see what it does.
>
> function __doPostBack(eventTarget, eventArgument) {
> var theform;
> if (window.navigator.appName.toLowerCase().indexOf("netscape")
> > -1) {
> theform = document.forms["_ctl0"];
> }
> else {
> theform = document._ctl0;
> }
> theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
> theform.__EVENTARGUMENT.value = eventArgument;
> theform.submit();
> }
>
>All __DoPostBack does is
>a) set the values of the event target and and argument, so the page
>knows what the user did and the post back model can route the call
>properly
>b) submits the form (performs the post back)
>
>
>On Tue, 22 Mar 2005 09:33:49 +0000, AHMET GULBAS <[EMAIL PROTECTED]>
>wrote:
> >
> > is there any good articles about javascript:__doPostBack('','') ,which
>is
> > automatically generated by vs.net,what it is doing and how it is
> > doing..thanks.
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
>
>--
>Dean Fiala
>Very Practical Software, Inc
>http://www.vpsw.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/