0 Replies - 1367 Views - Last Post: 24 June 2013 - 12:53 PM Rate Topic: -----

#1 jace75   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 31
  • Joined: 11-June 13

Input value is jumping from one text box to another on postback

Posted 24 June 2013 - 12:53 PM

I have an UpdatePanel form with a few textboxes here...

        TableCell Cell_BroadcastTitle = new TableCell();
        TextBox txt_BroadcastName = new TextBox();
        txt_BroadcastName.Text = b.Name;
        txt_BroadcastName.ID = "TXT_Broadcast_Update_Name";
        txt_BroadcastName.AutoPostBack = false;

        TableCell Cell_BroadcastCategories = new TableCell();
        DropDownList categoriesList = new DropDownList();
        categoriesList.ID = "DDL_Broadcast_Update_Category";
        foreach (BroadcastCategory bc in Composer.GetBroadcastCategories()) {
            ListItem item = new ListItem();
            item.Text = bc.Name;
            item.Value = bc.GetID().ToString();
        categoriesList.SelectedValue = b.CategoryID.ToString();
        categoriesList.AutoPostBack = false;

        TableCell Cell_BroadcastPath = new TableCell();
        TextBox txt_BroadcastPath = new TextBox();
        txt_BroadcastPath.Text = b.FilePath;
        txt_BroadcastName.ID = "TXT_Broadcast_Update_Path";
        txt_BroadcastPath.AutoPostBack = false;

        TableCell Cell_SubmitUpdate = new TableCell();
        Button btn_FinishBroadcastUpdate = new Button();
        btn_FinishBroadcastUpdate.ID = "BTN_FinishBroadcastUpdate";
        btn_FinishBroadcastUpdate.Text = "Done";
        btn_FinishBroadcastUpdate.Command += new CommandEventHandler(BTN_FinishBroadcastUpdate_Click);
        btn_FinishBroadcastUpdate.CommandArgument = b.GetID().ToString();

When my click event fires, the value for the Name textbox has moved to the filepath textbox, and the FilePath textbox is null. I have double checked my SQL tables, store proc, DAL and BLL commands, and compared my code here with my other forms that run exactly like it. What could cause this complete obfuscation?

(sigh) I see it now. I feel like an idiot...

I would delete the post...if I could find the "Delete Button." Anyways, happy coding! B)

Is This A Good Question/Topic? 0
  • +

Page 1 of 1