Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > asp.net, linkbutton __doPostBack in "href" element is treated like a link, not a server event

Reply
Thread Tools

asp.net, linkbutton __doPostBack in "href" element is treated like a link, not a server event

 
 
Eugene
Guest
Posts: n/a
 
      11-07-2004
Hi All,

I was moving an asp.net application from IIS 5 to IIS 6 and ran into a
weird kind of trouble. Also, the OS of the server changed to Windows
Server 2003. Any LinkButton click event is treated not like an actual
server event, but the __doPostBack... is being put in the address bar
of the browser and the browser gives me an "Invalid syntax error". All
buttons work fine, imagebuttons too, but not the linkbuttons. Have
anyone faced that issue before? Does anyone have an idea where I
should look to fix it?

Thank you.
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      11-08-2004
Hi Eugene,

Is it possible that the pages are finding the ASP.NET client scripts?

They should be in a location such as
C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_43 22

Ken

"Eugene" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi All,
>
> I was moving an asp.net application from IIS 5 to IIS 6 and ran into a
> weird kind of trouble. Also, the OS of the server changed to Windows
> Server 2003. Any LinkButton click event is treated not like an actual
> server event, but the __doPostBack... is being put in the address bar
> of the browser and the browser gives me an "Invalid syntax error". All
> buttons work fine, imagebuttons too, but not the linkbuttons. Have
> anyone faced that issue before? Does anyone have an idea where I
> should look to fix it?
>
> Thank you.


 
Reply With Quote
 
 
 
 
Eugene
Guest
Posts: n/a
 
      11-09-2004
Ken Cox (Thanks, Ken), suggested the following:

"
Hi Eugene,

Is it possible that the pages are finding the ASP.NET client scripts?

They should be in a location such as
C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_43 22

Ken
"

What exactly are client scripts, and how would they be interacting
with asp.net so that the functionality that I put in the application
is not there?

Thank you.
 
Reply With Quote
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      11-09-2004
Hi Eugene,

Some of the features in ASP.NET such as validators use client-side
JavaScript from libraries. If the scripts are on your development system,
you wouldn't notice them. If they aren't on the system where you are
deploying your app, you'd run into problems.

One way to tell is to run a page on your dev system and then do View >
Source in IE.

What JavaScript do you see?

Ken


"Eugene" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Ken Cox (Thanks, Ken), suggested the following:
>
> "
> Hi Eugene,
>
> Is it possible that the pages are finding the ASP.NET client scripts?
>
> They should be in a location such as
> C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_43 22
>
> Ken
> "
>
> What exactly are client scripts, and how would they be interacting
> with asp.net so that the functionality that I put in the application
> is not there?
>
> Thank you.


 
Reply With Quote
 
Eugene
Guest
Posts: n/a
 
      11-11-2004
Ken,

Thank you for your time!

I typed up a long, descriptive reply, but something happened and I got
logged out. So, I will be shorter this time.

That's the JavaScript from my production server:

<form name="Form1" method="post" action="login.aspx"
language="javascript" onsubmit="if (!ValidatorOnSubmit()) return
false;" id="Form1">

<script language="javascript" type="text/javascript">
<!--
var Page_Validators = new Array(document.all["RFValLogin"],
document.all["RegExLogin"], document.all["RFValPass"],
document.all["RegExPass"]);
// -->
</script>


<script language="javascript" type="text/javascript">
<!--
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" &&
clientInformation.appName.indexOf("Explorer") != -1) {
if ((typeof(Page_ValidationVer) != "undefined") &&
(Page_ValidationVer == "125"))
ValidatorOnLoad();
}

function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
return true;
}
// -->
</script>

The JavaScript from my development server is almost the same, it has a
little more attributes in some functions:

<script language="javascript">
<!--
var Page_Validators = new Array(document.all["RFValLogin"],
document.all["RegExLogin"], document.all["RFValPass"],
document.all["RegExPass"]);
// -->
</script>


<script language="javascript">
<!--
var Page_ValidationActive = false;
if (typeof(clientInformation) != "undefined" &&
clientInformation.appName.indexOf("Explorer") != -1) {
if (typeof(Page_ValidationVer) == "undefined")
alert("Unable to find script library
'/aspnet_client/system_web/1_1_4322/WebUIValidation.js'. Try placing
this file manually, or reinstall by running 'aspnet_regiis -c'.");
else if (Page_ValidationVer != "125")
alert("This page uses an incorrect version of
WebUIValidation.js. The page expects version 125. The script library
is " + Page_ValidationVer + ".");
else
ValidatorOnLoad();
}

function ValidatorOnSubmit() {
if (Page_ValidationActive) {
ValidatorCommonOnSubmit();
}
}
// -->
</script>

and some functions are written a bit differently:

<form name="Form1" method="post"
action="login.aspx?ReturnUrl=%2fInOut%2fDefault.as px"
language="javascript" onsubmit="ValidatorOnSubmit();" id="Form1">


But that might be because the development version has @Page directive
which says Debug="true". On the other hand, production version was
deployed using the Web Setup Project. So I don't have those .resx and
..vb files hanging around the virtual directory.

My development machine (XP Pro, SP1, IIS 5) has everything running
smootly. The server (Windows Server 2003, IIS 6) has those troubles.
Moreover, I cannot even log in now. The application does not reply to
button click events.

What do you think?

Thanks again,

Eugene
 
Reply With Quote
 
Eugene
Guest
Posts: n/a
 
      11-11-2004
Ken,

This is what I did that worked: aspnet_regiis -i

This might sound like a "DUH" kind of answer, but I did not have to
deal with Windows Server 2003 and IIS 6.

I am knocking on wood, because before it was also working and then
stopped working.

If there is nothing else in this post - it worked.

Thank you.

Eugene
 
Reply With Quote
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      11-11-2004
Glad to hear you got going!

It sure can be frustrating. Imagine if a car acted up like that just 'cause
you adjusted the seat. <grin>

"Eugene" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Ken,
>
> This is what I did that worked: aspnet_regiis -i
>
> This might sound like a "DUH" kind of answer, but I did not have to
> deal with Windows Server 2003 and IIS 6.
>
> I am knocking on wood, because before it was also working and then
> stopped working.
>
> If there is nothing else in this post - it worked.
>
> Thank you.
>
> Eugene


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
It's too bad sub-FF lenses are treated like second-class lenses by mfgs RichA Digital Photography 1 09-24-2011 01:23 AM
Linkbutton does not look like a linkbutton Sathyaish ASP .Net 3 09-08-2005 09:41 AM
Linkbutton does not look like a linkbutton Sathyaish ASP .Net Datagrid Control 1 09-08-2005 08:44 AM
ASP.NET 2.0 Page with LinkButton & __doPostBack client side script missing =?Utf-8?B?TGFuY2UgQWhsYmVyZw==?= ASP .Net 0 05-06-2004 06:11 AM
Overwriting the "href='javascript:__doPostBack........" in a LinkButton Jeffrey ASP .Net Building Controls 2 02-18-2004 04:11 PM



Advertisments