Solved

Set ID field dynamically

Posted on 2013-06-19
5
229 Views
Last Modified: 2013-06-19
See code

How do I set the ID column to the account number?  Kind of like I have...only have it work.
I get a not well formed error.

THIS SECTION:  ID='<%# Eval("ACCOUNT_NUMBER") %>'


<asp:TemplateField HeaderText="CLICK">
	<ItemTemplate>
	<asp:HyperLink ID='<%# Eval("ACCOUNT_NUMBER") %>' runat="server" NavigateUrl="#" 
	Text='<%# Eval("ACCOUNT_NUMBER") %>'></asp:HyperLink>
	</ItemTemplate>
</asp:TemplateField>

Open in new window

0
Comment
Question by:patriotpacer
  • 4
5 Comments
 
LVL 9

Accepted Solution

by:
COANetwork earned 500 total points
ID: 39259730
your hyperlink is a server-side control, I don't think you can set its ID dynamically.  Why do you need that?  you can use the name attribute, or text, like you are doing.
0
 

Author Comment

by:patriotpacer
ID: 39259736
>>your hyperlink is a server-side control, I don't think you can set its ID dynamically.  Why do you need that?  you can use the name attribute, or text, like you are doing.

I may be getting mixed up here.  I don't want to set the server side ID.  I want the client side ID.

Basically I want the link but, via Jquery, i want to know what particular link I clicked.
0
 

Author Comment

by:patriotpacer
ID: 39259752
Now that I'm clear I'm going to close out this question, do a little more homework, and then rephrase what I'm after.

But you did clear things up
0
 

Author Comment

by:patriotpacer
ID: 39259767
I've requested that this question be closed as follows:

Accepted answer: 0 points for patriotpacer's comment #a39259736

for the following reason:

Question was answered to what I unintentionally asked.
0
 

Author Comment

by:patriotpacer
ID: 39259768
COANetwork answered my question.  He should get full credit for the answer.

Please award him points.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Multiple file Upload asp.net 2 40
error on the asp.net page 1 33
Not showing JavaScript in the list 5 38
IIS Authorization for Web Service 2 22
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now