473,419 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

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 1933
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
15
by: Laser Lu | last post by:
In ASP and CGI, which one would be executed more fast and has the better execution efficiency in IIS? And how about writing CGI in VB? -- Best regards, Laser Lu
16
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other...
3
by: News Groups | last post by:
Dear Group I am trying to use the following code to refer to a form and control on my form. I am supposed to be using VBSCRIPT for this code. I always get an "object required: 'document' " error:...
6
by: Adam Short | last post by:
Can anyone help? I have all of a sudden started to receive this error on my site! I have no idea what script it is executing, why it is now failing, what is going on?? All I have been able...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
2
by: duncan | last post by:
why does this work :- <HEAD> ...... <SCRIPT LANGUAGE="javascript"> function test() { alert("test 1") } </SCRIPT>
6
by: zacks | last post by:
I am trying to write a VBScript that will be executed by a VB.NET 2005 program using Microsoft's Scripting Control. I have gotten a few simple scripts to work but I am having problems on one. I...
2
by: Beemer Biker | last post by:
I put together a few lines of vbscript so I could dump the contents of a string to my C drive. It worked fine in a small test.htm where I put the vbscript at the top of the file. It failed to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.