How to pass parameters from Silverlight to .aspx page
example: silverlight control has several textboxes (txtname, txtemail, txtmessage) , button (btnsend). want able pass these parameters .aspx page in order send email. welcome. thanks!
hello
add function in aspx page javascript
function setvalue(value) {
document.getelementbyid('<%=tbvalue.clientid%>').innertext = value;
}
and add label
<asp:label id="tbvalue" runat="server" style="visibility:hidden" />
on button click in silverlight
private void btnsetvalue_click(object sender, routedeventargs e)
{
system.windows.browser.htmlpage.window.eval(" setvalue( '" + txtvalue.text + "');");
}
happy coding
Silverlight > Programming Silverlight with .NET – General
Comments
Post a Comment