Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8380851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:33:44+00:00 2026-06-09T16:33:44+00:00

I am a new ASP.NET developer and I am developing a simple intranet registration

  • 0

I am a new ASP.NET developer and I am developing a simple intranet registration system for my department in the company. The available events will be listed in a GridView and the first column that shows the event title will be as a link button. What I want now is the following:

When the user clicks on one of these events title, a popup window will be displayed with showing the information of event which is already existed in the GridView with a Register Button. I am AjaxToolKit ModalPopUp Extender. I did almost everything but I don’t know how to show the information of that event in the ModalPopUp.

Could you please help me in this?

My Code-Behind (C#):

protected void lnkTitle_Click(object sender, EventArgs e)
{
    //to get the GridViewRow from the sender, so we can get the datakey we need
    GridViewRow gvrow = (GridViewRow)(((LinkButton)sender)).NamingContainer;
    HiddenField1.Value = ListOfAvailableEvents_GrivView.DataKeys[gvrow.RowIndex].Value.ToString();

    //show the modalPopUp
    modalPopupExtender1.Show();
}

My ASP.NET code:

<asp:GridView ID="ListOfAvailableEvents_GrivView" runat="server" AutoGenerateColumns="False"
    DataKeyNames="ID" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None"
    AllowPaging="True" PageSize="5">
    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" CssClass="generaltext" />
    <Columns>
        <asp:TemplateField HeaderText="Title">
            <ItemTemplate>
                <asp:LinkButton ID="lnkTitle" runat="server" Text='<%# Eval("Title") %>' OnClick="lnkTitle_Click"></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
        <asp:BoundField DataField="Location" HeaderText="Location" SortExpression="Location" />
        <asp:BoundField DataField="StartDateTime" HeaderText="Start Date & Time" SortExpression="StartDateTime" />
        <asp:BoundField DataField="EndDateTime" HeaderText="End Date & Time" SortExpression="EndDateTime" />
    </Columns>
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle Font-Bold="True" CssClass="complete" />
    <EditRowStyle BackColor="#999999" />
    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>

<asp:Button ID="btnModalPopUp" runat="server" Style="display: none" />
<ajaxToolkit:ModalPopupExtender ID="modalPopupExtender1" runat="server" TargetControlID="btnModalPopUp"
    PopupControlID="pnlPopUp" BackgroundCssClass="popUpStyle" PopupDragHandleControlID="panelDragHandle"
    OkControlID="OKButton">
</ajaxToolkit:ModalPopupExtender>

<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:Panel ID="pnlPopUp" runat="server" CssClass="popUpStyle">
    <asp:Button ID="confirmButton" runat="server" Text="Register" OnClick="btnSendConfirmationEmail_Click" />
    <asp:Button ID="OKButton" runat="server" Text="Cancel" />
</asp:Panel>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PM_RegistrationSysDBConnectionString %>"
    SelectCommand="SELECT     ID, Title, Description, Location, StartDateTime, EndDateTime
                    FROM         dbo.Events
                    WHERE     (IsActive = 1)
                    ORDER BY ID DESC">
</asp:SqlDataSource>

FYI, I have the following table in my database which I am binding it to the GridView:

Events Table: ID, Title, Description, Location, StartDateTime, EndDateTime

Please note I don’t want to show the ID with the other information in the GridView

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:33:45+00:00Added an answer on June 9, 2026 at 4:33 pm

    Here are couple of links that show a good tutorial and in my opinion would help you to achive what you want without using code-behind just using the client side so you can avoid the page refresh as user click the linkbutton

    http://technico.qnownow.com/using-ajax-modal-popup-extender-asp-net-gridview-control/

    http://shibashishdotnetocean.blogspot.com/2011/12/modalpopupextender-in-gridview.html

    http://www.dotnetcurry.com/ShowArticle.aspx?ID=212

    http://kishor-naik-dotnet.blogspot.com/2011/10/ajax-modalpopupextender-in-gridview.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a new C# and ASP.NET developer. I am developing a simple intranet
I am a new ASP.NET developer and I am developing a traning management system
I am a new ASP.NET developer and I am developing a web-based suggestions box
I am a new ASP.NET developer and I am trying to develop a simple
I am a New ASP.NET Developer and I am trying to develop a simple
I created a new ASP.NET website using Visual Web Developer 2008 Express edition and
I'm developer moving from C# to Java. Heard about new ASP net feature. <%:
I'm planning a new ASP.NET project that will become a product that is installed
I am a brand new Java developer (I have been working in asp.net) and
Using ASP.Net Am New to website development Currently am developing a web pages, when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.