<input type="file" id="AddPhoto" name="fileinput" class="input" onchange="fileInputChange(this, 'image', '<%=Method %>')"; runat="server" />解析出来后变成了:
<input name="FlipWindowPlaceHolder$ctl00$AddPhoto" type="file" id="FlipWindowPlaceHolder_ctl00_AddPhoto" onchange="fileInputChange(this, 'image', '<%=Method %>');" />
而不是我要的变量值,请问要如何写才能正确的得到变量值?
<input name="FlipWindowPlaceHolder$ctl00$AddPhoto" type="file" id="FlipWindowPlaceHolder_ctl00_AddPhoto" onchange="fileInputChange(this, 'image', '<%=Method %>');" />
而不是我要的变量值,请问要如何写才能正确的得到变量值?
解决二:
protected void Page_Load(object sender, EventArgs e)
{
AddPhoto.Attributes.Add("onchange", string.Format("fileInputChange(this, 'image', '{0}')", Method));
}