// Simulate a mouse click:
window.location.href = "http://www.w3schools.com";// Simulate an HTTP redirect:
window.location.replace("http://www.w3schools.com");
// Simulate a mouse click:
window.location.href = "http://www.w3schools.com";Varchar:-
ddlPositions.SelectedValue = dt.Rows[0]["PostHeld"].ToString();
ddlTypeOfCourt.SelectedValue= courtApplicationDatesDTO.CourtTypeId.ToString();
selectedvalue will work
selecteditem.value will not work on above
but when we set the value to object from drop down selecteditem.value will work as below
courtApplicationDatesDTO.CourtTypeId = Convert.ToInt32(ddlTypeOfCourt.SelectedItem.Value);
https://www.c-sharpcorner.com/UploadFile/1e050f/edit-and-update-record-in-gridview-in-Asp-Net/
or
<asp:GridView ID="grd_Batch" AutoGenerateColumns="false" runat="server" DataKeyNames="Batch_id"
AllowPaging="true" PageSize="20" PagerSettings-Position="Bottom" PagerSettings-PageButtonCount="10"
Width="100%" CssClass="table table-bordered table-hover table-stripped table-condensed table-responsive"
OnRowEditing="grd_Batch_RowEditing" OnRowCancelingEdit="grd_Batch_RowCancelingEdit" OnRowDataBound="grd_Batch_RowDataBound"
OnRowUpdating="grd_Batch_RowUpdating" OnRowDeleting="grd_Batch_RowDeleting" OnRowCommand="grd_Batch_RowCommand">
<Columns>
<asp:TemplateField HeaderText="EDIT">
<ItemTemplate>