Professional Web Applications Themes

Edit Existing Record - Dreamweaver AppDev

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>...

  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. #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

  3. #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

Similar Threads

  1. Edit existing page with new template
    By rpeluso in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: March 7th, 04:00 PM
  2. How do I edit existing information on my web page?
    By speets in forum Macromedia Contribute Connection Administrtion
    Replies: 1
    Last Post: February 16th, 03:03 AM
  3. How can I add to existing Record Set?
    By michaaal in forum ASP Database
    Replies: 1
    Last Post: August 5th, 01:01 PM
  4. Disabling a field when editing an existing record in a Datagrid
    By Mark Perona in forum ASP.NET General
    Replies: 2
    Last Post: August 12th, 07:24 PM
  5. Replies: 0
    Last Post: July 28th, 05:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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