client side validation stops working going from 2003 to 2005

Hi all, I'm running into a problem with a solution i want to upgrade. Works fine under vs2003/1.1 Under vs2005/2.0 it will build without error but when i load up the site, my login button doesnt do anything. The code of the login aspx and vb pages are identical at this point betwen vs2003 and vs2005. However the html that each page renders is different. Here's what i get for vs2003 (this works):

<a id="btnLogin" title="Login" class="BtnGrey" href="javascript:{if (typeof(Page_ClientValidate) != 'function' || Page_ClientValidate()) __doPostBack('btnLogin','')} ">Login</a> 
  And this is what i get under vs2005 (and doesn't work):
<a id="btnLogin" title="Login" class="BtnGrey" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnLogin&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true))&quot;>Login</a> 

I assume all those quot statements shouldn't be there. Any idea why this is happening and how i can fix it? Could i use vs2005 but run it under asp.net 1.1 (assuming that might do anything)? Not sure if this related but when i open the aspx page in vs2005, at the top it's indicating an error with: saying it cant find part of the path and it displays the local path on disk, which as far as i can see is correct. If on the btnlogin i set causesvalidation=false, then the page works. The html rendered for the button appears to be ok and clicking the button puts it through the login routine. All the rest of the pages on the site also seem to fail as far as the client side validation goes. Any ideas as to what i should be looking at to resolve this? thanks

0
merk
11/14/2008 6:05:51 PM
asp.net.migrate-vs2003-vs2005 590 articles. 0 followers. Follow

4 Replies
639 Views

Similar Articles

[PageSpeed] 15

Hi,

There are a couple of differences between ASP.NET 1.1 validators and 2.0 validators.

We can try to run "aspnet_regiis.exe –c" to install the correct version of WebUIValidation.js for your website. We also can try to delete these Validators and re-add them from Visual Studio 2005.

For more information, see http://aspalliance.com/699_Solving_the_Challenges_of_ASPNET_Validation.all

 

I look forward to hearing from you.


Thomas Sun
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
0
Thomas
11/18/2008 10:18:45 AM

Hmm. I actually tried doing this. however, i just looked in the aspnet_client folder.

I have aspnet_client\system_web\2_0_50727\CrystalReportWebFormViewer3 and CrystalReportWebFormViewer4 and that's it. There's no js file (other then in the crystal report folders).

However, i just looked at the page you linked to, and according to that article, there shouldn't be any js file for .net 2.0 - and the error with the submit button not working is supposed to be a 1.1 error. I'm trying to run the site under 2.0 - or is that the problem here. Is the page still trying to use the 1.1 validation? That doesn't explain why the html looks incorrect though. When i look at the source code of the page AS RENDERED BY IE - i'm NOT looking at the .cs file - i'm looking at the html sent to the browser - look at the 2nd line of code i posted in my original post. Why is it rendered the html for the button incorrectly? I'm pretty sure all those quot statements shouldn't be quot but should actually rendered at double quotes "

0
merk
11/18/2008 6:14:57 PM

Hi,

Thanks for your response.

After migrating to ASP.NET 2.0, Validator uses 2.0 version scripts that are embedded into ASP.NET assemblies.

If we deploy it on the IIS, we need to configurate it to run under ASP.NET 2.0 version

We also can create simple test ASP.NET 2.0 website with Validator to see is it works.

 

I look forward to hearing from you.


Thomas Sun
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
0
Thomas
11/19/2008 3:42:30 AM

yes the website is already configured to run under .net 2.0 - i've switched it to 2.0 in IIS. I dont have any problems running other .net 2.0 websites on this machine. So i'm pretty sure whatever the problem is is specific to this one project i am trying to upgrade to 2.0

I've made other websites in visual studio which use validators and they work. But this site, when i try to upgrade to 2.0, the validation is failing. Again, i believe it is failing because the html that is sent to the browser appears to be incorrect to me. Please look at the html code i posted at the start of this post. You should see that is has quot instead of " in the html. Because of this, the submit button does not work since this is in the onclick event for the button.

0
merk
11/19/2008 6:35:59 AM
Reply: