hi
actually following code is inside mysilverlight control xaml cs file
Uri uri = new Uri(HtmlPage.Document.DocumentUri, String.Format("SanofiApplicationTestPage.aspx?type={0}", extension));
WebClient client = new WebClient();
//client.Headers[HttpRequestHeader.ContentType] = "application/vnd.ms-excel";
client.UploadStringCompleted +=
new UploadStringCompletedEventHandler(client_UploadStringCompleted);
client.UploadStringAsync(uri,content);
}
void client_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
{
HtmlPage.Window.Navigate(new Uri(HtmlPage.Document.DocumentUri, String.Format("Export.{0}", extension)), "_blank");
}
this following code is inside myapptname.aspx page!
protected void Page_Load(object sender, EventArgs e)
{
string path = Server.MapPath(String.Format("~/Export.{0}", Request.QueryString["type"]));
if (File.Exists(path))
{
File.Delete(path);
}
using (FileStream fs = File.Create(path))
{
using (StreamReader sr = new StreamReader(Request.InputStream))
{
Byte[] info = System.Text.Encoding.Default.GetBytes(sr.ReadToEnd());
fs.Write(info, 0, info.Length);
}
}
}
but! show the error message "Failed to map the path '/Export'."
so! how can i do that!
thanks