Edit Existing Record

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Edit Existing Record

    Hi All My scenario is as follows: I have a page where users can edit existing
    records. Within this page I have several dropdownlists which is bound to
    various datasets. My problems is that I want the selected item in the
    dropdownlists to be that of the record being edited. This is what I have:

    <script runat="server">
    protected void Page_Load(Object Src, EventArgs E)
    {
    if(!Page.IsPostBack)
    {
    H_StartTimeID.DataSource = dsStartTime.DefaultView;
    H_StartTimeID.DataBind();
    }
    }
    </script>
    AND
    <asp:DropDownList
    DataTextField="S_Time"
    DataValueField="S_TimeID"
    ID="H_StartTimeID"
    runat="server"
    OnLoad="H_StartTimeID_Load">
    <asp:ListItem value=""></asp:ListItem>
    </asp:DropDownList>

    vdykcj Guest

  2. Similar Questions and Discussions

    1. Edit existing page with new template
      I am using Contribute 4, and am trying to edit an existing page. it is my index page, and I want to start fresh with one of the templates provided....
    2. How do I edit existing information on my web page?
      :confused; I'm a new Contribute user and am working on an existing web site at my organization. Adding a link to the page works fine, it's...
    3. How can I add to existing Record Set?
      I use code like this in order to create a recordset and enter data into the recordset: strSQL = "SELECT * FROM InventoryItemList WHERE Desc LIKE...
    4. Disabling a field when editing an existing record in a Datagrid
      I created an ASP.net form with an editable datagrid on it. I can create new records, and update and delete existing records. The problem I have is...
    5. Update existing From record with changes on new To record
      I need to create a history record and update a current record from one input form. The two tables are joined with a query and the table names and...
  3. #2

    Default Re: Edit Existing Record

    When you created your dynamic drop down list, the option was available at the
    bottom of the Form for 'search value equal to'. By clicking the lightning bolt,
    you can click the corresponding field in the recodset that is sending the
    request. This should return the current value in the drop down list in the edit
    result record.

    bstanic Guest

  4. #3

    Default Re: Edit Existing Record

    bstanic Thanks for your response. I have tried that but then I get the
    following error message: Any other ideas!

    Compiler Error Message: CS0121: The call is ambiguous between the following
    methods or properties: 'DreamweaverCtrls.DataSet.FieldValue(string,
    System.Web.UI.WebControls.DataListItem)' and
    'DreamweaverCtrls.DataSet.FieldValue(string,
    System.Web.UI.WebControls.DataGridItem)'
    Source Error:
    Line 29: <body>
    Line 30: <form runat="server">
    Line 31: <% DropDownList1.SelectedIndex =
    DropDownList1.Items.IndexOf(DropDownList1.Items.Fi ndByValue(dsDetail.FieldValue(
    "H_StartTimeID", null) )); %>
    Line 32: <asp:DropDownList ID="DropDownList1" DataSource="<%#
    dsStartTime.DefaultView %>" DataTextField="S_Time" DataValueField="S_TimeID"
    runat="server"></asp:DropDownList>
    Line 33:

    vdykcj Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139