Quantcast
Channel: CodeProject Latest postings for ASP.NET
Viewing all articles
Browse latest Browse all 3938

how to linbutton's text on another page button click event

$
0
0
this is my code on webform1.aspx
<asp:GridView ID="GridView1" runat="server" Width="100%" SkinID="GridView"
OnSorting="GridView1_Sorting" OnDataBound="GridView1_DataBound"
OnRowDataBound="GridView1_RowDataBound" AutoGenerateColumns="false"
OnPageIndexChanging="OnPaging" ShowHeader="true" AllowPaging="True"
ShowHeaderWhenEmpty="True" AllowSorting="True"
onrowcommand="GridView1_RowCommand" PageSize="20">

<asp:TemplateField ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Top">
<HeaderTemplate>Action</HeaderTemplate>
<HeaderStyle />

<asp:LinkButton ID="lnkverify" runat="server" Text="Verify" CommandName="Application_verify" CommandArgument='<%#Eval("RequestId") %>' />    
<asp:LinkButton ID="lnkreject" runat="server" Text="Reject" CommandName="Appication_reject" CommandArgument='<%#Eval("RequestId") %>' />




on webform.aspx.cs
protectedvoid GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            try
            {
                if (e.CommandName == "Application_verify")
                {
                    int RequestId = Convert.ToInt32(e.CommandArgument);
                    Response.Redirect("~/ApplicationDetails.aspx?RequestId=" + RequestId);
                }
                if (e.CommandName == "Appication_reject")
                {
                    int RequestId = Convert.ToInt32(e.CommandArgument);
                    //Response.Redirect("?projectid=" + projectid);
                }
                
            }
            catch (ApplicationException ex)
            {
                lblsuccess.Visible = true;
                lblsuccess.Text = ex.Message;
            }
            catch (Exception ex)
            {
                StackTrace st = new StackTrace(new StackFrame(true));
                StackFrame sf = st.GetFrame(0);
 
                int line = sf.GetFileLineNumber() - 1;
                if (ex.Message.StartsWith("Thread") == false) { Response.Redirect("~/HandleError.aspx?ID=" + ex.Message, false); }
            }
        }
on Applicationdetails.aspx page i have a button control.on this button click event ,i want to change linkbutton's(this linkbutton is on webform1.aspx) text from "verify" to "verified".pls help me

Viewing all articles
Browse latest Browse all 3938

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>