|
-
Oct 12th, 2011, 03:42 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Call Parent control C# Method from Javascript ?
It's been quite a while since my last post here. Guess I've been pretty busy 
Ok I'm going to try to make this clear. I have a C# WPF application. One of my cotrols hosts a WebBrowser control which displays an HTML page that displays a Silverlight control. I want my WPF control, the initial one to know when the silverlight control is finished loading. I know I already can attach a Javascript method to my silverlight control, this way when the silverlight control is done loading, the javascript function is called. Now is there a way I could call a C# method that is in my Initial C# control, the one hosting the WebBrowser Control, from that javascript method ?
I know I can call C# methods that are in my Silverlight control, I've already done that for other purposes, but what I need now is to call a method from the Parent control hosting whe webbrowser control which I am not sure can be done.
Thanks for any help you can give.
Alex
.NET developer
"No. Not even in the face of Armageddon. Never compromise." (Walter Kovacs/Rorschach)
Things to consider before posting.
Don't forget to rate the posts if they helped and mark thread as resolved when they are.
.Net Regex Syntax (Scripting) | .Net Regex Language Element | .Net Regex Class | DateTime format | Framework 4.0: what's new
My fresh new blog : writingthecode, even if I don't post much.
System: Intel i7 920, Kingston SSDNow V100 64gig, HDD WD Caviar Black 1TB, External WD "My Book" 500GB, XFX Radeon 4890 XT 1GB, 12 GBs Tri-Channel RAM, 1x27" and 1x23" LCDs, Windows 10 x64, ]VS2015, Framework 3.5 and 4.0 
-
Oct 13th, 2011, 09:19 AM
#2
Thread Starter
Fanatic Member
Re: Call Parent control C# Method from Javascript ?
I found a workaround. Instead of letting the application know when the silverlight control is loaded to pass it a certain value I decided to pass the value to my Html page in the querystring and retrive that querystring parameter whenever I want in the silverlight control.
Alex
.NET developer
"No. Not even in the face of Armageddon. Never compromise." (Walter Kovacs/Rorschach)
Things to consider before posting.
Don't forget to rate the posts if they helped and mark thread as resolved when they are.
.Net Regex Syntax (Scripting) | .Net Regex Language Element | .Net Regex Class | DateTime format | Framework 4.0: what's new
My fresh new blog : writingthecode, even if I don't post much.
System: Intel i7 920, Kingston SSDNow V100 64gig, HDD WD Caviar Black 1TB, External WD "My Book" 500GB, XFX Radeon 4890 XT 1GB, 12 GBs Tri-Channel RAM, 1x27" and 1x23" LCDs, Windows 10 x64, ]VS2015, Framework 3.5 and 4.0 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|