I have a list of anchor tags that when clicked I would like the value of their ID attribute to be send to the parameter of a stored procedure. Everything works fine except I don't know how to make the second argument of the `AddWithValue` method of the `Parameters` property of the `SqlCommand` accept whatever is clicked instead of hard coding it. The results are read from a simple stored procedure and then put into a grid view control

markup:

```
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="jQueryEachExample._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

    <asp:HyperLink ID="Xtown" runat="server">Xtown</asp:HyperLink>
    <asp:HyperLink ID="Ztown" runat="server">Ztown</asp:HyperLink>
    <asp:HyperLink ID="Atown" runat="server">Atown</asp:HyperLink>
    <asp:HyperLink ID="Bburg" runat="server">Bburg</asp:HyperLink>

<asp:GridView runat="server" ID="stateGridView">

</asp:GridView>     

</asp:Content>

```

code behind

```
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;

namespace jQueryEachExample
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //let the connection string be read from the web.config file
            string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString;

            //create a connection
            using (SqlConnection conn = new SqlConnection(cs))
            {
                //open connection
                conn.Open();
                //create the SqlCommand object
                SqlCommand cmd = new SqlCommand("spFindCityInfo", conn);
                cmd.CommandType = CommandType.StoredProcedure;
                //cmd.Parameters.AddWithValue("@cityName",this argument needs to be the id attribute of the link was that clicked
                cmd.Parameters.AddWithValue("@cityName", Xtown.ID);//Xtown.ID is what needs to be whatever is clicked
                //create a reader
                using (SqlDataReader reader = cmd.ExecuteReader())
                {
                    stateGridView.DataSource = reader;
                    stateGridView.DataBind();
                }

            }

        }
    }
}

```