i have a grid view and in this grid view, after click on button the Gridview_RowCommand is called
But My problem is I want to fill a text box,
after Button click and Before Gridview_RowCommand,
and if user Blank the text box then Gridview_RowCommand is not called,
because i want to use that text box value in gridview row command,
what I do so far is:
i call a ajax_popupextender on button click,
but before opening the ajax_popupextender all Gridview_RowCommand Code is Excuted,
so what can i do ?????
And Plz Don't advice that I write the code on ajax_popupextender button click,
Because For Many condition I Call the same ajax_popupextender,
My Code is:
Pop Is:
<asp:Button runat="server" ID="FakeButton10" Text="hi" Style="display: none" />
<asp:Panel ID="FlagIt" runat="server">
<div class="topBottom">
<table>
<tr>
<td>
<asp:Label ID="lblstar" Font-Bold="true" Font-Size="20px" ForeColor="Red" runat="server"
Text="*"></asp:Label>
Add Description
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="txtDescri" CssClass="txtFinal" Height="70px" Width="200px" TextMode="MultiLine"
runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator5"
runat="server" Font-Bold="true" ForeColor="Red" ControlToValidate="txtDescri"
ValidationGroup="flag" ErrorMessage="***"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Button ID="BtnSubmit" runat="server" CssClass="btndesign" ValidationGroup="flag"
Text="Submit" OnClick="BtnSubmit_Click" />
</td>
</tr>
</table>
</div>
</asp:Panel>
<asp:ModalPopupExtender PopupControlID="FlagIt" runat="server" ID="flagitshow" TargetControlID="FakeButton10"
CancelControlID="ImgflagClose" BackgroundCssClass="modalPopupCss" BehaviorID="flagitshow">
</asp:ModalPopupExtender>
Row Coommnad Code is:
protected void gd_cat_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "View_Profile")
{
flagitshow.Show();
tbl_admin_myActivity m1 = new tbl_admin_myActivity();
m1.T_id = Convert.ToInt32(Session["T_id"]);
m1.date = DateTime.Now;
m1.resion = txtDescri.Text;
li.tbl_admin_myActivities.InsertOnSubmit(m1);
li.SubmitChanges();