implementing iteration- and conditional-tags with ASP.NET

J

jurujuba

Hi,

I want to write iteration- and conditional-tags with asp.net, but I
found nothing about it in books, MSDN or online-articels.

Could someone please explain me or post a link to an article where is
described how I can do that ?
Maybe I'm using the wrong expressions. Conditional- and Iteration-Tags
is how you call this in JSP.

thanks for your help,
jurujuba
 
E

Eliyahu Goldin

Do you mean server tags that you put in.aspx files like <asp:label ...> and
they would operate like javascript if and for statements?

Eliyahu

jurujuba said:
Hi,

I want to write iteration- and conditional-tags with asp.net, but I
found nothing about it in books, MSDN or online-articels.

Could someone please explain me or post a link to an article where is
described how I can do that ?
Maybe I'm using the wrong expressions. Conditional- and Iteration-Tags
is how you call this in JSP.

thanks for your help,
jurujuba
 
J

jurujuba

Hi,

yes, that's what I mean. Do I have to use javascript for that ?


the usage of the conditional-tag could look like this:

<mytag:condition execute="true" runat="server">
<b>it is true!</b>
</mytag:condition>


<mytag:condition execute="false" runat="server">
<b>it is NOT true</b>
</mytag:condition>

this code-snippet would result in the output "it is true !" because
the conditional-tag would not execute it's body if execute is set
"false".

How can you do that with ASP.net ?

(I'm sorry, I'm a Java-programmer and new to .net Wink)

And there is another question...
How can I define tags with a body in ASP.NET ?

thanks for your help,
Frank
 
E

Eliyahu Goldin

Frank,

Yes, you need to write server-side scripts for that.

Eliyahu

jurujuba said:
Hi,

yes, that's what I mean. Do I have to use javascript for that ?


the usage of the conditional-tag could look like this:

<mytag:condition execute="true" runat="server">
<b>it is true!</b>
</mytag:condition>


<mytag:condition execute="false" runat="server">
<b>it is NOT true</b>
</mytag:condition>

this code-snippet would result in the output "it is true !" because
the conditional-tag would not execute it's body if execute is set
"false".

How can you do that with ASP.net ?

(I'm sorry, I'm a Java-programmer and new to .net Wink)

And there is another question...
How can I define tags with a body in ASP.NET ?

thanks for your help,
Frank
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top