Response.Write("<script>");
Response.Write("alert('Hello World');");
Response.Write("</script>");
it will show message Dialog when it work.
Response.Write("<script>");
Response.Write("alert('Hello World');");
Response.Write("</script>");
public partial class SendFile : System.Web.UI.Page
{
public string getFilePath
{get {HttpPostedFile pf = fileupload.PostedFile;
return pf.FileName;
}
}// เมื่อคลิกส่ง
protected void cmdXMLInfo_Click(object sender, EventArgs e)
{
Server.Transfer("~/XmlDescription.aspx", true);
}
}
<%@ PreviousPageType VirtualPath="JobCreator2.aspx" %>
public partial class XmlDescription : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string filePath = "";
if (PreviousPage != null)
{
SendFile sf = PreviousPage as SendFile;
if (sf != null)
{
try
{
filePath = sf.getFilePath;
XmlManage xm = new XmlManage();
MyProcess[] mypro = xm.ReadXmlFrom(filePath);
gridviewXML.DataSource = mypro;
gridviewXML.DataBind();
}
catch(Exception err)
{
result.Text = err.Message;
}
}
}
}