Link to home
Start Free TrialLog in
Avatar of patriotpacer
patriotpacer

asked on

Set ID field dynamically

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

ASKER CERTIFIED SOLUTION
Avatar of COANetwork
COANetwork

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of patriotpacer
patriotpacer

ASKER

>>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.
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
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.
COANetwork answered my question.  He should get full credit for the answer.

Please award him points.