469,621 Members | 1,688 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

VBScript causing problems

Hello All,
I am using ASP.NET 2.0 and I am experiencing a problem using vbscript
that is this script on client side is preventing the postback of my
controls.

I have a dropdownlist which is supposed to perform some fucntion when
the selected index is changed, it works fine without vbscript code(when
i comment out that code) but when I uncomment the code the postback
dosen't happen.

Any ideas/suggestions will really be appreciated.
Thanks.

Aug 21 '06 #1
6 1797
You don't use vbscript as a client language in ASP.NET.
Use Javascript instead, if you must use client script.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hello All,
I am using ASP.NET 2.0 and I am experiencing a problem using vbscript
that is this script on client side is preventing the postback of my
controls.
I have a dropdownlist which is supposed to perform some fucntion when
the selected index is changed, it works fine without vbscript code(when
i comment out that code) but when I uncomment the code the postback
dosen't happen.

Any ideas/suggestions will really be appreciated.
Thanks.

Aug 21 '06 #2
Juan,
But in ASP.NET 1.1 I have used vbscript as a client side scripting
language....has it changed in 2.0???
Juan T. Llibre wrote:
You don't use vbscript as a client language in ASP.NET.
Use Javascript instead, if you must use client script.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hello All,
I am using ASP.NET 2.0 and I am experiencing a problem using vbscript
that is this script on client side is preventing the postback of my
controls.
I have a dropdownlist which is supposed to perform some fucntion when
the selected index is changed, it works fine without vbscript code(when
i comment out that code) but when I uncomment the code the postback
dosen't happen.

Any ideas/suggestions will really be appreciated.
Thanks.
Aug 21 '06 #3
re:
But in ASP.NET 1.1 I have used vbscript as a client side scripting
language....has it changed in 2.0???
Please post a working sample of Vbscript working under ASP.NET 1.1.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Juan,
But in ASP.NET 1.1 I have used vbscript as a client side scripting
language....has it changed in 2.0???
Juan T. Llibre wrote:
You don't use vbscript as a client language in ASP.NET.
Use Javascript instead, if you must use client script.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hello All,
I am using ASP.NET 2.0 and I am experiencing a problem using vbscript
that is this script on client side is preventing the postback of my
controls.
I have a dropdownlist which is supposed to perform some fucntion when
the selected index is changed, it works fine without vbscript code(when
i comment out that code) but when I uncomment the code the postback
dosen't happen.

Any ideas/suggestions will really be appreciated.
Thanks.

Aug 21 '06 #4
What does this means then???
<meta content="VBScript" name="vs_defaultClientScript">
And I have used vbscript at client side to perform certain functions
like :-

AT SERVER SIDE:-
button1.Attributes.Add("onclick", "return test()")

AT CLIENT SIDE :-
<script language="vbscript">
function test
document.getelementbyid("textbox1").value =
parent.main.document.documentelement.outerhtml
end function
</script>

This is a Working Example in 1.1 using vbscript and this code will put
OuterHtml in textbox1 when you click button1.

Thanks.
Juan T. Llibre wrote:
re:
But in ASP.NET 1.1 I have used vbscript as a client side scripting
language....has it changed in 2.0???

Please post a working sample of Vbscript working under ASP.NET 1.1.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Juan,
But in ASP.NET 1.1 I have used vbscript as a client side scripting
language....has it changed in 2.0???
Juan T. Llibre wrote:
You don't use vbscript as a client language in ASP.NET.
Use Javascript instead, if you must use client script.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hello All,
I am using ASP.NET 2.0 and I am experiencing a problem using vbscript
that is this script on client side is preventing the postback of my
controls.
I have a dropdownlist which is supposed to perform some fucntion when
the selected index is changed, it works fine without vbscript code(when
i comment out that code) but when I uncomment the code the postback
dosen't happen.
>
Any ideas/suggestions will really be appreciated.
>
>
Thanks.
Aug 21 '06 #5
re:
AT SERVER SIDE:-
button1.Attributes.Add("onclick", "return test()")

Sorry, that's Javascript..

re:
---00---
AT CLIENT SIDE :-
<script language="vbscript">
function test
document.getelementbyid("textbox1").value =
parent.main.document.documentelement.outerhtml
end function
</script>
---00---

I've never seen VBScript working that way.

You might be able to get it to work this way :

Page.RegisterStartupScript( MyDataGrid.UniqueID,
"<script language='vbscript'>ProcessDataGrid( '" & MyDataGrid.ClientID & "' )</script>

In truth, VBscript was orphaned in ASP.NET.

See :
http://www.devx.com/DevX/Article/158...ticle&trk=MSCP

Quite frankly, VBScript sucks...except as vbs scripts to be run with WScript and/or Cscript.
As a client scripting language, it's only understood by IE and the market is a lot more than just
IE.

I encourage you to stop butting your head against the wall...and use Javascript.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
What does this means then???
<meta content="VBScript" name="vs_defaultClientScript">
And I have used vbscript at client side to perform certain functions
like :-

AT SERVER SIDE:-
button1.Attributes.Add("onclick", "return test()")

AT CLIENT SIDE :-
<script language="vbscript">
function test
document.getelementbyid("textbox1").value =
parent.main.document.documentelement.outerhtml
end function
</script>

This is a Working Example in 1.1 using vbscript and this code will put
OuterHtml in textbox1 when you click button1.

Thanks.
Juan T. Llibre wrote:
re:
But in ASP.NET 1.1 I have used vbscript as a client side scripting
language....has it changed in 2.0???

Please post a working sample of Vbscript working under ASP.NET 1.1.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Juan,
But in ASP.NET 1.1 I have used vbscript as a client side scripting
language....has it changed in 2.0???
Juan T. Llibre wrote:
You don't use vbscript as a client language in ASP.NET.
Use Javascript instead, if you must use client script.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<ri****************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hello All,
I am using ASP.NET 2.0 and I am experiencing a problem using vbscript
that is this script on client side is preventing the postback of my
controls.
I have a dropdownlist which is supposed to perform some fucntion when
the selected index is changed, it works fine without vbscript code(when
i comment out that code) but when I uncomment the code the postback
dosen't happen.
>
Any ideas/suggestions will really be appreciated.
>
>
Thanks.


Aug 21 '06 #6
Hi Juan,

Juan T. Llibre wrote:
You don't use vbscript as a client language in ASP.NET.
Use Javascript instead, if you must use client script.
Since the script language used is a matter of the client, and since IE
understands VBScript as well as JavaScript, I don't see why VBScript
wouldn't work. However, the client-side language of choice is and
remains JavaScript. Firefox and other major web clients don't understand
VBScript anyway. My guess is that it's going to slowly disappear, but it
will still be supported in IE to avoid breaking existing web pages.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Aug 22 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

29 posts views Thread by Christopher Brandsdal | last post: by
15 posts views Thread by Laser Lu | last post: by
16 posts views Thread by Mike Schinkel | last post: by
2 posts views Thread by duncan | last post: by
6 posts views Thread by zacks | last post: by
2 posts views Thread by Beemer Biker | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.