Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / September 2003

Tip: Looking for answers? Try searching our database.

WebBrowser Name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Craig Francis - 23 Sep 2003 09:04 GMT
When your using JavaScript in an IE window (WebBrowser)
you can return or set the name of the window using the
following...

    <script type="text/javascript">
      window.name="New Name";
      alert (window.name);
    </script>

Is it possible to-do the same thing in VB.NET?

I'm not sure, but you might be able to use...

    Browser1.GetProperty("???")

NOTE: Already posted in
microsoft.public.inetsdk.programming.webbrowser_ctl, but
no reply, if a solution is found then I will also post in
there (as I hate finding when other people have a
problem, but the solution wasn't printed)

Thanks in Advance
Craig
Cor - 23 Sep 2003 09:18 GMT
Hi Craig,
I think not, this is Client side.
And with VB.net you are mostly working on the serverside.
So what you can do is past a piece like this in your aspx file
Or just send a page with a message label (Or another control) back.
I hopes this helps a little bit,
Cor

ps. the browser class is for browsing like IE with a window form.
Cor - 23 Sep 2003 11:02 GMT
Hi Craig,
I think it can be done like this,
I think there must be a better way to transport the name to the client page.
But I could not find it.
If you find it, tell us please.
<script type="text/javascript">
 window.name=document.all.item('label1').innerText;
 document.all.item('label1').innerText=""
       alert (window.name);
</script>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)  Handles MyBase.Load
       Me.Label1.Text = "The first text"
   End Sub
   Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
       Me.Label1.Text = "A new text"
   End Sub
End Class

Funny excercise
Cor

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.