M
Marko Vuksanovic
I am trying to cause the uplaod button, id="Upload",when clicked, to exectue the onClick event for Button1, id="Button1".
<asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload>
<asp:Button id="Upload" Text="Upload file" runat="server"> </asp:Button>
<asp:Button id="Button1" OnClick="UploadButton_Click" runat="server" Visible="false">
in the code behind file I am using the following code to add the __doPostBack to the Upload button:
protected void Page_Load(object sender, EventArgs e)
{
Upload.Attributes.Add("onClick", "__doPosback(" + Button1.ToString() + ",'')");
}
When I run this in IE the javascript throws the error:
'System' is undefined.
When I use the source view, the line which causes the error is as follows:
<input type="submit" name="Upload" value="Upload file" onclick="__doPosback(System.Web.UI.WebControls.Button,'');" id="Upload" />
What am I doing wrong? Any help is greatly appreciated.
Thanks,
M. Vuksanovic.
<asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload>
<asp:Button id="Upload" Text="Upload file" runat="server"> </asp:Button>
<asp:Button id="Button1" OnClick="UploadButton_Click" runat="server" Visible="false">
in the code behind file I am using the following code to add the __doPostBack to the Upload button:
protected void Page_Load(object sender, EventArgs e)
{
Upload.Attributes.Add("onClick", "__doPosback(" + Button1.ToString() + ",'')");
}
When I run this in IE the javascript throws the error:
'System' is undefined.
When I use the source view, the line which causes the error is as follows:
<input type="submit" name="Upload" value="Upload file" onclick="__doPosback(System.Web.UI.WebControls.Button,'');" id="Upload" />
What am I doing wrong? Any help is greatly appreciated.
Thanks,
M. Vuksanovic.