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

  • Thread starter Thread starter Fabrizio Cyber
  • Start date Start date
F

Fabrizio Cyber

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
 
Fabrizio Cyber said:
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.
 
* Fabrizio Cyber said:
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.
 
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
 
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
 
Fabrizio Cyber said:
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.
 
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.
 
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
 
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
 
Back
Top