c# - edit in detailsview with dropdownlist -


i new @ asp.net c#. edit detailsview dropdown list. have followed instructions on link -- this link-- , orrigionally thought of. flawed however, because although can see items on dropdown list, not update database. @ loss. have been trying find answer couple of days , unsure of need do. there need in backend? attach code @ end well. have nothing going on in backend.

        <asp:sqldatasource id="sqldatasource1" runat="server" connectionstring="<%$ connectionstrings:it_supportconnectionstring %>" deletecommand="delete [issues] [issue_id] = @issue_id" insertcommand="insert [issues] ([requestor], [email], [urgency], [issue_type], [details], [priority], [issue_manager], [status], [date_reported]) values (@requestor, @email, @urgency, @issue_type, @details, @priority, @issue_manager, @status, @date_reported)" selectcommand="select issues.issue_id, issues.requestor, issues.email, issues.phone, issues.urgency, issues.issue_type_id,issue_type.[issue_type_id], issue_type.[issue_type],  issues.details, issues.priority, issues.issue_manager, issues.status, issues.date_reported, issues.notes issues left outer join issue_type on issue_type.issue_type_id = issues.issue_type_id (issues.issue_id = @issue_id)" updatecommand="update issues set requestor = @requestor, email = @email, urgency = @urgency, details = @details, priority = @priority, issue_manager = @issue_manager, status = @status, date_reported = @date_reported (issue_id = @issue_id)">              <deleteparameters>                  <asp:parameter name="issue_id" type="int32" />              </deleteparameters>              <insertparameters>                  <asp:parameter name="requestor" type="string" />                  <asp:parameter name="email" type="string" />                  <asp:parameter name="urgency" type="string" />                  <asp:parameter name="issue_type" type="string" />                  <asp:parameter name="details" type="string" />                  <asp:parameter name="priority" type="int32" />                  <asp:parameter name="issue_manager" type="string" />                  <asp:parameter name="status" type="string" />                  <asp:parameter name="date_reported" type="datetime" />              </insertparameters>              <selectparameters>                  <asp:querystringparameter name="issue_id" querystringfield="id" type="int32" />              </selectparameters>              <updateparameters>                  <asp:parameter name="requestor" type="string" />                  <asp:parameter name="email" type="string" />                  <asp:parameter name="urgency" type="string" />                  <asp:parameter name="details" type="string" />                  <asp:parameter name="priority" type="int32" />                  <asp:parameter name="issue_manager" type="string" />                  <asp:parameter name="status" type="string" />                  <asp:parameter name="date_reported" type="datetime" />                  <asp:parameter name="issue_id" type="int32" />              </updateparameters>          </asp:sqldatasource>                <asp:sqldatasource id="sqldatasource2" runat="server" connectionstring="<%$ connectionstrings:it_supportconnectionstring %>" selectcommand="select issue_type.issue_type_id, issue_type.issue_type, issues.issue_type_id expr1 issue_type left outer join issues on issue_type.issue_type_id = issues.issue_type_id"></asp:sqldatasource>           <asp:detailsview id="detailsview1" runat="server" autogeneraterows="false" backcolor="#deba84" bordercolor="#deba84" borderstyle="none" borderwidth="1px" cellpadding="3" cellspacing="2" datasourceid="sqldatasource1" height="50px" width="125px">              <editrowstyle backcolor="#738a9c" font-bold="true" forecolor="white" />              <fields>                  <asp:boundfield datafield="issue_id" headertext="issue_id" insertvisible="false" readonly="true" sortexpression="issue_id" />                  <asp:boundfield datafield="requestor" headertext="requestor" sortexpression="requestor" />                  <asp:boundfield datafield="email" headertext="email" sortexpression="email" />                  <asp:boundfield datafield="phone" headertext="phone" sortexpression="phone" />                  <asp:boundfield datafield="urgency" headertext="urgency" sortexpression="urgency" />                  <asp:templatefield headertext="issue_type_id" sortexpression="issue_type_id">                      <edititemtemplate>                          <asp:dropdownlist id="dropdownlist1" runat="server" datasourceid="sqldatasource2" datatextfield="issue_type_id" datavaluefield="expr1" selectedvalue='<%# bind("issue_type_id") %>'>                          </asp:dropdownlist>                      </edititemtemplate>                      <insertitemtemplate>                          <asp:textbox id="textbox1" runat="server" text='<%# bind("issue_type_id") %>'></asp:textbox>                      </insertitemtemplate>                      <itemtemplate>                          <asp:label id="label1" runat="server" text='<%# bind("issue_type_id") %>'></asp:label>                      </itemtemplate>                  </asp:templatefield>                  <asp:boundfield datafield="issue_type" headertext="issue_type" sortexpression="issue_type" />                  <asp:boundfield datafield="details" headertext="details" sortexpression="details" />                  <asp:boundfield datafield="priority" headertext="priority" sortexpression="priority" />                  <asp:boundfield datafield="issue_manager" headertext="issue_manager" sortexpression="issue_manager" />                  <asp:boundfield datafield="status" headertext="status" sortexpression="status" />                  <asp:boundfield datafield="date_reported" headertext="date_reported" sortexpression="date_reported" />                  <asp:boundfield datafield="notes" headertext="notes" sortexpression="notes" />                  <asp:commandfield showdeletebutton="true" showeditbutton="true" />              </fields>              <footerstyle backcolor="#f7dfb5" forecolor="#8c4510" />              <headerstyle backcolor="#a55129" font-bold="true" forecolor="white" />              <pagerstyle forecolor="#8c4510" horizontalalign="center" />              <rowstyle backcolor="#fff7e7" forecolor="#8c4510" />          </asp:detailsview>


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -