Connecting Tech Pros Worldwide Forums | Help | Site Map

How add javascript into html file throw C#?

Newbie
 
Join Date: Sep 2009
Posts: 21
#1: Oct 2 '09
hi,

i used vs 2005 , w m 6.0 and c# to develop window mobile application.
I Used xml file in my project which contain some html source i display
this source in web browser control.
Now i want to change or add some style throw java script in this existing html file and show in web browser control.
please give me some idea how add java script in existing html file and how call it to show in web browser control throw c#.
please give me some sample code related this thread if possible.

thanx.

Banned
 
Join Date: Oct 2009
Posts: 5
#2: Oct 3 '09

re: How add javascript into html file throw C#?


To insert a java script, you may use simple file I/O.

1. Open file
2. Seek to the position
3. copy from there to file end (say to array Buf)
4. insert your java script
5. Now write array Buf back again


To see the HTML on the browser, you may add the browser control to your C# app.

Regards,

Neo
Reply


Similar Mobile Development bytes