setting the value of attribute in code render block

S

stormogulen

Hi!

I'm new to ASP.net, to please bear with me...

Anyway, I'm making some kind of a tabcontrol, which I would like to
specify with the following code:

<cc1:Tab Label="Tab1" NavigationUrl="some_other_url" Target=""
runat="server" />
</cc1:TabControl>

Now, I would like to add some parameters to the NavigationUrl, say
something like 'some_url?ID=123&Name=A.

I have the values for the ID and Name in some variables, but I cannot
figure out how to put them into the NavigationUrl. What kind of Code
Render Tag should I use?

In classic ASP you could write something like <%= variable_name %> in
the tag, but that doesn't work anymore.

How do you do it in asp.net?

Best regards,
Bjarne
 
F

Frederik Van Lierde

I agree with Mark Rae, forgot old ASP, forget VB6, leanr vb.net :)

<%= variable_name %>

you can use

NavigationUrl='<%# me.VariableName %>'
NavigationUrl='<%# System.String.Format("{0}", me.variableName) %>'

Frederik Van Lierde
http://www.SilverSandsAssociates.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top