Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wish to use c# code with in the script portion of ASP.net, like php. How can I do this.

I think my question is not informatic.In php we use php code and html tags in same page.Is this possible in ASP.net with c#
Posted
Updated 2-Oct-10 6:02am
v2
Comments
Sandeep Mewara 18-Sep-10 10:19am    
Elaborate! What do you mean by using C# code in script portion?
MalikRizwan 3-Oct-10 1:02am    
this way you are taking the beauty of asp.net..
I believe based on some checks you want to show something to users.

you can do this using Literal Controls.

put literal control in aspx and assign its value from backend

1 solution

Embedded Code Blocks in ASP.NET Web Pages[^]. Google is your friend...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900