<asp:Panel ID="pnlPopupQuestionAdd" runat="server"> <div align="center" style="background-color: White; margin: 5px; padding: 5px;"> <table> <tr> <td colspan="2" align="center"> <asp:Label ID="lblHeader" runat="server" Text="Add Checklist Question" /> </td> </tr> <tr> <td> <asp:Label ID="lblPopFileType" runat="server" Text="Type:" /> <asp:Label ID="lblMandatoryFldType" runat="server" Text="*" ForeColor="Red" /> </td> <td> <asp:DropDownList ID="ddlPopupType" runat="server" /> </td> </tr> <tr> <td> <asp:Label ID="lblpopSchoolName" runat="server" Text="School Name:" /> <asp:Label ID="lblMandatoryFldName" runat="server" Text="*" ForeColor="Red" /> </td> <td> <asp:DropDownList ID="ddlPopSchoolName" runat="server" /> </td> </tr> <tr> <td> <asp:Label ID="lblPageNo" runat="server" Text="Page Number:" /> </td> <td> <asp:TextBox ID="txtPageNo" runat="server" /> </td> </tr> <tr> <td> <asp:Label ID="lblQuesNo" runat="server" Text="Question Number:" /> <asp:Label ID="lblMandatoryFldQuesNo" runat="server" Text="*" ForeColor="Red" /> </td> <td> <asp:TextBox ID="txtQuesNo" runat="server" /> </td> </tr> <tr> <td> <asp:RequiredFieldValidator ID="reqFldValQuesNo" runat="server" SetFocusOnError="true" ErrorMessage="Enter Question Number" ControlToValidate="txtQuesNo" /> </td> <td> <asp:RegularExpressionValidator ID="regExpValQuesNo" runat="server" ErrorMessage="Enter Numeric Only" SetFocusOnError="true" ControlToValidate="txtQuesNo" ValidationExpression="^\d+$" /> </td> <td> </td> </tr> <tr> <td> <asp:Label ID="lblQues" runat="server" Text="Checklist Question:" /> <asp:Label ID="lblMandatoryFldQues" runat="server" Text="*" ForeColor="Red" /> </td> <td> <asp:TextBox ID="txtQues" runat="server" TextMode="MultiLine" /> </td> </tr> <td></td> <td> <asp:RequiredFieldValidator ID="reqFldValAddQuesText" runat="server" ErrorMessage="Enter Question" SetFocusOnError="true" ControlToValidate="txtQues" /> </td> <tr> <td align="center" colspan="2"> <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" /> <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" /> </td> </tr> <tr> <td colspan="2"> <asp:Label ID="lblNotes" runat="server" Text="Note: Question Number will overwrite Page Number in case of any discrepancies." /> </td> </tr> </table> </div> </asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="popAddQues" runat="server" TargetControlID="lnkAddNewQues" PopupControlID="pnlPopupQuestionAdd" CancelControlID="btnCancel" Enabled="true" BackgroundCssClass="modalBackground" DropShadow="false" />
//link Button(on click Popup should come) <asp:LinkButton ID="lnkAddNewQues" runat="server" Text="Add" OnClick="lnkAddNewQues_Click" />
protected void lnkAddNewQues_Click(object sender, EventArgs e) { fillType(ddlEditQuesType); fillSchool(ddlQuesEditSchoolName); ddlEditQuesType.SelectedItem.Text = ddlType.SelectedItem.Text; ddlQuesEditSchoolName.SelectedItem.Text = ddlSchoolName.SelectedItem.Text; //txtQuesEditPageNo,txtQuesEditQuesNo,txtChklistQuesEditQues string Ques = ddlChecklistQuestions.SelectedItem.Text; int length = Ques.Length; txtQuesEditPageNo.Text = Ques.Substring(0, 1); txtQuesEditQuesNo.Text = Ques.Substring(2, 1); txtChklistQuesEditQues.Text = Ques.Substring(4, length - 4); }
<asp:linkbutton id="lnkAddNewQues" runat="server" text="Add" onclick="lnkAddNewQues_Click" causesvalidation="false" />
protected void lnkAddNewQues_Click(object sender, EventArgs e) handles lnkAddNewQues.Click
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)