Gemini78 wrote:
Grazie per l'aiuto
hai un piccolo esempio?
Io ho provato, ma mi dice che InitParameters è di sola lettuta.
<script runat="server">
public void Page_load(object sender, EventArgs e)
{
Xaml1.InitParameters = String.Format("xx=ciao,{0}", Xaml1.InitParameters);
}
</script>
<html xmlns="
http://www.w3.org/1999/xhtml" style="height: 100%;"> <head runat="server">
<title>SilverlightApplication1</title>
</head>
<body style="height: 100%; margin: 0;">
<form id="form1" runat="server" style="height: 100%;">
<asp:ScriptManager ID="ScriptManager1"
runat="server"></asp:ScriptManager>
<div style="height: 100%;">
<asp:Silverlight ID="Xaml1" runat="server"
Source="~/ClientBin/SilverlightApplication1.xap"
MinimumVersion="2.0.31005.0" Width="100%" Height="100%" InitParameters="UploadPage=FileUpload.ashx,Filter=Video(
.avi;*.mpg;*.mpeg;*.flv)|*.avi;*.mpg;*.mpeg;.flv,MaxConcurrentUploads=1, Multiselect=false, MaxNumberToUpload=1, TotalFilesUploaded=1" /> </div>
</form>
</body>
</html>
E in Silverlight:
private void Application_Startup(object sender, StartupEventArgs e) {
string xx = e.InitParams["xx"];
//...