Ajax Uploader not working in post back

  •  08-04-2010, 12:45 PM

    Ajax Uploader not working in post back

    Hi!
        I am using Ajax Uploader in grid, so every row has this control. In the same grid i have text box (auto post back = "true"). In row #1, I type some text and select the value for the uploader control. And then if i type some text in text box of row # 2 (page gets posted) then the selected value of ajax uploader control in row #1 gets cleared. Here below i pasted my sample code. can u please help me? Thanks in advance
     
    Thank you
    By
    Ram Kumar 
     
    public DataTable dt; void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { dt = new DataTable(); dt.Columns.Add("col1"); if (ViewState["dt"] == null) { dt = AddRow(dt); radGrid1.DataSource = dt; radGrid1.DataBind(); ViewState["dt"] = dt; } else dt = (DataTable)ViewState["dt"]; } } private DataTable AddRow(DataTable dt) { for (int i = 0; i < 5; i++) { DataRow dr = dt.NewRow(); dr[0] = ""; dt.Rows.Add(dr); } return dt; } //void radGrid1_OnNeedDataSource(object source, GridNeedDataSourceEventArgs e) //{ // if (IsPostBack) // { // ViewState["dt"] = dt; // dt = (DataTable)ViewState["dt"]; // radGrid1.DataSource = dt; // } //} void radGrid1_ItemDataBound(object sender, GridItemEventArgs e) { CuteWebUI.UploadAttachments attachment2 = (CuteWebUI.UploadAttachments)e.Item.FindControl("UploadAttachment_New"); if (attachment2 != null) { attachment2.FileUploaded += new UploaderEventHandler(Uploader_FileUpload); hfUAID.Value += attachment2.ClientID; hfUAID.Value += ";"; } CuteWebUI.UploadAttachments attachment3 = (CuteWebUI.UploadAttachments)e.Item.FindControl("UploadAttachment_New_1"); if (attachment3 != null) { //attachment2.FileUploaded += new UploaderEventHandler(Uploader_FileUpload); hfUAID1.Value += attachment3.ClientID; hfUAID1.Value += ";"; } } Name:
    function submitbutton_click() { var hy1=document.getElementById(""); var names=hy1.value.split(";") for(var i=0;i"); var names1=hy2.value.split(";") for(var j=0;j
View Complete Thread