setting the value of attribute in code render block

  • Thread starter Thread starter stormogulen
  • Start date Start date
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
 
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
 
Back
Top