473,473 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Expression on html "client" control?

Hi , when I apply expression on a pure HTML control , like<img src=<%$
resources:...% > , I got a compilation error and said this is not allowed
,after I add "runat=server", the problem is fixed.But it's kind of ugly since
it will unnecessarily consume some of CPU cycles to process in the asp.net
engine. I'm not sure if there is a way to get it work?

Appreciate any help.
Apr 4 '06 #1
2 1067
you can move the expression to the code-behind as a property of the page

Then --
<img src="<%= PropertyName.% >"> will do it

"walter" <ww*@morneausobeco.com> wrote in message
news:91**********************************@microsof t.com...
Hi , when I apply expression on a pure HTML control , like<img src=<%$
resources:...% > , I got a compilation error and said this is not allowed
,after I add "runat=server", the problem is fixed.But it's kind of ugly
since
it will unnecessarily consume some of CPU cycles to process in the asp.net
engine. I'm not sure if there is a way to get it work?

Appreciate any help.

Apr 4 '06 #2
Thanks Swanand, It looks like <%$ expression is second-class citizen. Your
approach is great except that I want to keep page authoring away from
code-behind.--In my company , we want to keep the page more declarative way.
"Swanand Mokashi" wrote:
you can move the expression to the code-behind as a property of the page

Then --
<img src="<%= PropertyName.% >"> will do it

"walter" <ww*@morneausobeco.com> wrote in message
news:91**********************************@microsof t.com...
Hi , when I apply expression on a pure HTML control , like<img src=<%$
resources:...% > , I got a compilation error and said this is not allowed
,after I add "runat=server", the problem is fixed.But it's kind of ugly
since
it will unnecessarily consume some of CPU cycles to process in the asp.net
engine. I'm not sure if there is a way to get it work?

Appreciate any help.


Apr 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: polarpolar | last post by:
Hi, All : I wrote a simple server in Python, and I can get the client IP by following script: s = socket.socket( socket.AF_INET, socket.SOCK_STREAM ) s.bind( (HOST, PORT) ) s.listen(1)...
0
by: Cave | last post by:
Is there a way to install the SQL Reporting Services Client on Whidbey ? The installer searches the system for an installation of Visual Studio 2003 in order to install the client part of SQL RPS....
1
by: Jacques Cooper | last post by:
Hello, We are looking for some C# .NET source code (preferably free, but we will pay for the source code) that implements an FTP "put:" command (uploading a file). We found a couple of C#...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
0
by: Ron | last post by:
I've an aspx page with a custom (composite) server control and a TextBox, both with RequiredFieldValidators. I'd like the custom control to behave the same way the default TextBox does when one...
4
by: Alex Maghen | last post by:
I want to create an ASP.NET class which generates some client-side HTML objects on a page with the following rules: 1. Only generate these objects from the class if they haven't already been...
3
by: TheSteph | last post by:
Hi, I've made a CustomPanel derived from the Panel class. How can I set my own size of the "client area" of that CustomPanel ? ("client area" = Size of the rectangle in which one can drop...
3
nirmalsingh
by: nirmalsingh | last post by:
hai all, i want to get client control value in server side code(c#) i am using asp.net 2005. can anybody help with sample code? thanx in advance. With Lov -Nirmal
1
by: arad | last post by:
I need help creating a flash slideshow that's going to be part of a photography website (done in flash) that I am creating for a client. It needs to have thumbnails that the user can navigate through...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.