<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MarkDetails.aspx.cs" Inherits="Mark" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1"> <title>Mark Details</title> </head> <script type="text/javascript"> function GetMarkDetails() { var SubjectCount = document.getElementsByName("subject").length; // alert(SubjectCount); var value=""; var strSubjectID = ""; for(var i=0; i<SubjectCount; i++) { if(value + document.getElementById("txtSubject" + i).value == "") { alert("Please enter Your Marks"); return false; } value = value + document.getElementById("txtSubject" + i).value +","; strSubjectID = strSubjectID + document.getElementById("hidSubject" + i).value.replace("/","") + ","; // alert(strSubjectID) } document.getElementById("hidMarks").value=value; document.getElementById("hidSubject").value=strSubjectID; } </script> <body> <%--<form id="form1" runat="server">--%> <center> <div> <table> <tr> <td style="width: 400px;"> <div> <center> <table> <tr> <td> <table border="1"> <tr style="background-color: Crimson; color: Snow;"> <th colspan="2"> Student Master </th> </tr> <tr> <td> Student Name </td> <td> <asp:DropDownList ID="DDLThird" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DDLThird_SelectedIndexChanged" DataTextField="Student_Name" DataValueField="Student_ID"> <asp:ListItem Text="Select" Value=""></asp:ListItem> </asp:DropDownList> </td> </tr> </table> <div> <asp:ScriptManager ID="ShowSubjectAlert" runat="server" /> </div> </td> </tr> <tr align="right"> <td colspan="2"> <input type="hidden" name="hidden1" id="hidMarks" value="" runat="server" /> <input type="hidden" name="hidden2" id="hidSubject" value="" runat="server" /> </td> </tr> </table> </center> </div> <center> <div id="divMark" runat="server"> </div> <table> <tr> <td> <asp:Button ID="btnAddMarks" Text="Add Marks" runat="server" OnClientClick="GetMarkDetails()" OnClick="btnAddMarks_Click" Visible="true"></asp:Button> </td> <td> <asp:Button ID="btSubjectMaster" Text="Back" runat="server" OnClick="SubjectMaster_Click" /><asp:Button ID="btGridview" Text="Next" runat="server" OnClick="GridViewNext_Click" /> </td> </tr> </table> </center> </td> </tr> </table> </div> </center> <%-- </form>--%> </body> </html> </asp:Content>
Wednesday, July 30, 2014
Student mark list continue
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment