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

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607