DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 21 Aug 2007 01:32:03 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    JohnHorb
          2    unknown
          3    JohnHorb
                 4    JohnHorb


VBSCRIPT with autopostback - VS2005   
I have a problem with client-side VBSCRIPT on a page with auto-postback 
controls.
I have generated a simple page with a listbox, set to autopostback. This 
works OK. If I then generate some client-side VBSCRIPT, VS creates a VBSCRIPT 
script block. Even if I delete everything within the block, just leaving the 
<script> </script> tags, I get an error on the page if I click an item in the 
list box. If I use JScript, rather than VBScript, I don;t see the issue. This 
was all working with VS2003, but not with 2005. The only difference I can 
see, is that, for the postback,  VS2005 generates 

javascript:settimeout(__DoPostback(...),0)

whereas VS2003 does not generate the settimeout:-

javascript:__DoPostback(...)

Anyone come across this problem? I'm converting quite a large VS2003 app to 
VS2005, and don't really want to have to rewrite all my client-side scripts 
in JScript.
Date:Tue, 21 Aug 2007 01:32:03 -0700   Author:  

Re: VBSCRIPT with autopostback - VS2005   
Do your client side <script> tags specify the type? e.g.

<script type="text/vbscript">

</script>
Date:Tue, 21 Aug 2007 08:55:02 -0000   Author:  

Re: VBSCRIPT with autopostback - VS2005   
"ca8msm@aspnetlibrary.com" wrote:


> Do your client side <script> tags specify the type? e.g.
> 
> <script type="text/vbscript">
> 
> </script>
> 
> 


Yes. as I say, the annoying thing is it all worked fine in VS2003.
Date:Tue, 21 Aug 2007 02:16:02 -0700   Author:  

Re: VBSCRIPT with autopostback - VS2005   
"JohnHorb" wrote:


> 
> 
> "ca8msm@aspnetlibrary.com" wrote:
> 
> > Do your client side <script> tags specify the type? e.g.
> > 
> > <script type="text/vbscript">
> > 
> > </script>
> > 
> > 
> 
> Yes. as I say, the annoying thing is it all worked fine in VS2003.
> 


Well after some hours of hard googling, found that the answer is to move the 
vbscript block from the top of the file, where VS2005 puts it, to after the 
</body> tag. (I suspect the crtical thing is to ensure it goes after the 
jscript __DoPostback block).
Date:Tue, 21 Aug 2007 10:30:02 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us