C# How can I show the row number from my Grid

quest_capital used Ask the Experts™
I have a javascript that need to get the name of each of my textboxes in a dynamic gridview.
The name of the textbox in the sourcecode will end up like:
The only thing that changes for each of my textbox name is "ctl02" which represents the row of the grid.  
My javascript below needs the updated row number.
How can I ether:
1. Get the number placed in the javascript from the aspx page.
2. Just write the the javascript function with the dynamic row number placed in the code from the code behide page (.cs)
<script type="text/javascript">
                            function openCalendar1()

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Please explain from where you call this popup caledar function ?

Like onclick of each row or button in each row ?

Put some aspx over here.

If inside grdiview

                <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick='<%# "return popup("+ Container.DataItemIndex.ToString() +");" %>'>LinkButton</asp:LinkButton>

Open in new window

I used a Litial tag in the code behind.

lt_cal.Text = "<script type=\"text/javascript\">";
        lt_cal.Text = lt_cal.Text + "function openCalendar1() {";
        lt_cal.Text = lt_cal.Text + "window.open('PopupCalendar.aspx?textbox=" + tb_CreationDate.ClientID.ToString() + "','cal','width=220,height=200,left=270,top=180')";
        lt_cal.Text = lt_cal.Text + " } </script>";

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial