HI,
i want to call fileupload browse window as i check on checkbox how should i do that please help me ...
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dipankar BiswasRank #992 · 2K reputationPosted Feb 18, 2015, 3:34 AM EST
Try it...
cs..
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
CheckBox1.Attributes.Add("onclick", "document.getElementById('" + FileUpload1.ClientID + "').click();");
if (FileUpload1.HasFile)
TextBox1.Text = FileUpload1.FileName;
}
}
aspx...
Result..
.................................................................
Thanks & Regards ,Dipankar Biswas
Dipankar BiswasRank #992 · 2K reputationPosted Feb 17, 2015, 7:45 PM EST
you can try it...
asp:CheckBox ID="CheckBox1" runat="server" oncheckedchanged="CheckBox1_CheckedChanged" AutoPostBack="True"/> And u can add onclickevent.. onclick="document.getElementById('').click(); return false;" .......................................anusha reddy9 reputationPosted Feb 17, 2015, 8:23 PM EST
I already tried it its not working
anusha reddy9 reputationPosted Feb 18, 2015, 6:25 PM EST
Thanks alot its working.....
Regards
Anusha Reddy
anusha reddy9 reputationPosted Feb 18, 2015, 6:49 PM EST
As iam using 10 checkbox with each fileupload as i check on one check box the fileupload is being done by the code which you give but the problem is if i check the second check box the path in the first fileupload is being cleared please help me out in this issue
Dipankar BiswasRank #992 · 2K reputationPosted Feb 18, 2015, 11:40 PM EST
i don't knw,why u r using 10 ckbox..??
please ck my video or atth file.. for Upload multiple files....
https://www.youtube.com/channel/UCVmP2ZiGYCJT1cuFSiF8dNQ
anusha reddy9 reputationPosted Feb 23, 2015, 10:57 PM EST
thanks a ton its working