Skip to main content
Home Forums Silverlight Programming Programming with JavaScript issue when passing silverlight values to aspx page
4 replies. Latest Post by hemanth53 on June 30, 2009.
(0)
kashyap415
Member
5 points
11 Posts
06-24-2009 3:33 PM |
I have a problem I am using silverlight control on a modelpopup and when i click a button in my silverlight control, i am using
HtmlPage
to pass the value to my aspx page.
where my javascript is
}
Line: 187Error: Invalid pointer
Can anyone help me.
mrjvdveen
Participant
1939 points
367 Posts
06-25-2009 2:41 AM |
Sounds to me that the JS function can not be found. Have you tried calling it from the aspx page itself? You could use the document.onload to test it.
HTH.
hemanth53
11 points
8 Posts
06-30-2009 1:31 AM |
If you are still facing the issue, you can try with this alternative solution if your requirement matches.
Have a hidden field in the aspx(By default empty). When you want the button click event to be triggered, assign some value to this hidden field from the silver light code and Submit the aspx form from Silver Light code itself.
In aspx.cs check for this hidden filed. If hidden filed is empty then it is Normal Flow. If this contains some value, Call your button click event or logic u want to implement. And later clear the hidden filed.
Amanda W...
All-Star
17241 points
1,466 Posts
06-30-2009 4:26 AM |
Hi,
We have a test with your provided code in ourlabs, it works fine.
Maybe, other code of your page cause this problem, we would suggest that you can have a test with a new created project. And add the code to page step by step to find the cause.
06-30-2009 4:43 AM |
May be the control id name is not proper. For example when master page concept comes into picture...the id of the control will be different.
To get that control id View Source in the Browser and then give the control id if i am rite.