By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,903 Members | 1,677 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,903 IT Pros & Developers. It's quick & easy.

How to use a script into a visual basic .net program ???

P: n/a
Hi all,

I want to use a .js into a visual basic project. How can I do it ? I've
tried to open the script code into my project....and then ??? I see the code
but I don't jnow how to make it interact with the vb program.

Every kind of help is well accepted.

Thank you .

Fabrizio
Nov 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"Fabrizio Cyber" <fa*****@lombardiacom.it> schrieb
I want to use a .js into a visual basic project. How can I do it ?
I've tried to open the script code into my project....and then ??? I
see the code but I don't jnow how to make it interact with the vb
program.

Every kind of help is well accepted.


I don't understand the question. In a VB.NET project, you can write VB.NET
code, build and start the application. The VB.NET compiler doesn't
understand code from a .js file.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #2

P: n/a
* Fabrizio Cyber schrieb:
I want to use a .js into a visual basic project. How can I do it ? I've
tried to open the script code into my project....and then ??? I see the code
but I don't jnow how to make it interact with the vb program.


You cannot use JavaScript code inside a Visual Basic .NET source file.

--
Herfried K. Wagner
Microsoft MVP
<http://www.mvps.org/dotnet>

Nov 20 '05 #3

P: n/a
Cor
Hi Fabrizio,

For a webform
\\\
Dim str As String
str = "<script language=javascript> {window.open('http://www.google.com');}
</script>"
RegisterStartupScript("Startup", str)
///
For a windowform (author HKW) I think he did forget it :-))
\\\
AxWebBrowser.Navigate("about:<html><body
onload=javascript:window.external.addFavorite('" + textbox1.Text +
"')></body></html>")
///
I hope this helps a little bit?

Cor
Nov 20 '05 #4

P: n/a
sorry, I'll try to explain me better.
I have a script that modifies the visibility of some objects into an html
page. I have to open this html page from a vb.net code; so , to allow the
html page change aspect, I have to execute the appropiate script that makes
the html page to change; and I have to execute this script from my vb code !
Is there any way to do it ? Please tell me everything you think It could
be useful or not.
Fabrizio
"Armin Zingler" <az*******@freenet.de> ha scritto nel messaggio
news:eH**************@TK2MSFTNGP12.phx.gbl...
"Fabrizio Cyber" <fa*****@lombardiacom.it> schrieb
I want to use a .js into a visual basic project. How can I do it ?
I've tried to open the script code into my project....and then ??? I
see the code but I don't jnow how to make it interact with the vb
program.

Every kind of help is well accepted.


I don't understand the question. In a VB.NET project, you can write VB.NET
code, build and start the application. The VB.NET compiler doesn't
understand code from a .js file.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #5

P: n/a
"Fabrizio Cyber" <fa*****@lombardiacom.it> schrieb
sorry, I'll try to explain me better.
I have a script that modifies the visibility of some objects into an
html page. I have to open this html page from a vb.net code; so ,
to allow the html page change aspect, I have to execute the
appropiate script that makes the html page to change; and I have to
execute this script from my vb code ! Is there any way to do it ?
Please tell me everything you think It could be useful or not.
Fabrizio


Sorry, I have no idea how to do this. I have no clue how you open the html
page, how to read it and what "change aspect" means. I have also no idea
where the page is stored and when and how you want to change the page.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #6

P: n/a
Fabio,

It is possible to build the page with javascript in it with vb.net but I
dont think that is what you are after. so start at
http://www.perfectxml.com/dotnetexample.asp?id=1

of course you need a web server that supports ASP.NET server for this to
work.

For some reason, many ISP's I have encoutnered are afraid of .NET web
programs citing security concerns. When I quiz them further they indicate
they know nothing about .NET most of the time.

"Fabrizio Cyber" <fa*****@lombardiacom.it> wrote in message
news:uJ**************@tk2msftngp13.phx.gbl...
sorry, I'll try to explain me better.
I have a script that modifies the visibility of some objects into an html
page. I have to open this html page from a vb.net code; so , to allow the html page change aspect, I have to execute the appropiate script that makes the html page to change; and I have to execute this script from my vb code ! Is there any way to do it ? Please tell me everything you think It could be useful or not.
Fabrizio
"Armin Zingler" <az*******@freenet.de> ha scritto nel messaggio
news:eH**************@TK2MSFTNGP12.phx.gbl...
"Fabrizio Cyber" <fa*****@lombardiacom.it> schrieb
I want to use a .js into a visual basic project. How can I do it ?
I've tried to open the script code into my project....and then ??? I
see the code but I don't jnow how to make it interact with the vb
program.

Every kind of help is well accepted.


I don't understand the question. In a VB.NET project, you can write VB.NET code, build and start the application. The VB.NET compiler doesn't
understand code from a .js file.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html


Nov 20 '05 #7

P: n/a
Cor
Hi Fabrizio
I have a script that modifies the visibility of some objects into an html
page. I have to open this html page from a vb.net code; so , to allow the html page change aspect, I have to execute the appropiate script that makes the html page to change; and I have to execute this script from my vb code ! Is there any way to do it ? Please tell me everything you think It could be useful or not.
Fabrizio


I thought I sended that and see it in the thread on West European Time at
15:16

Dit it not arive?

Cor
Nov 20 '05 #8

P: n/a
Fabrizio,
Is the html page running/displayed on a server or a client?

Is the VB.NET code running on a server or a client?

Is this a web project and is ASP.NET involved? More specifically what type
of project are you working on? Are multiple project types involved (such as
class library, control library, windows form, web service, web app, console,
other)?

Is the JavaScript embedded in the HTML page?

It sounds like you want to open a page in a web browser and have the java
script in the page execute.

Hope this helps
Jay

"Fabrizio Cyber" <fa*****@lombardiacom.it> wrote in message
news:uJ**************@tk2msftngp13.phx.gbl...
sorry, I'll try to explain me better.
I have a script that modifies the visibility of some objects into an html
page. I have to open this html page from a vb.net code; so , to allow the html page change aspect, I have to execute the appropiate script that makes the html page to change; and I have to execute this script from my vb code ! Is there any way to do it ? Please tell me everything you think It could be useful or not.
Fabrizio
"Armin Zingler" <az*******@freenet.de> ha scritto nel messaggio
news:eH**************@TK2MSFTNGP12.phx.gbl...
"Fabrizio Cyber" <fa*****@lombardiacom.it> schrieb
I want to use a .js into a visual basic project. How can I do it ?
I've tried to open the script code into my project....and then ??? I
see the code but I don't jnow how to make it interact with the vb
program.

Every kind of help is well accepted.


I don't understand the question. In a VB.NET project, you can write VB.NET code, build and start the application. The VB.NET compiler doesn't
understand code from a .js file.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html


Nov 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.