473,833 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rendering imageurl html

Hi all!

I'm having some trouble using user controls.

Situation:

An apsx page contains an user control (Control A) that contains
another user control(Control B). Control B is located in the subfolder
"Controls" and has some imagebutton server controls. I want to set the
imageurl of these image controls directly into the html using:

<code>

<ASP:IMAGEBUTTO N runat="server" id="btnTest"
imageurl='<%=Se ssion["imgprefix"]%>images/test.gif'/>

</code>

the html output from .NET :

<code>

<input type="image" name="ctrlA:ctr lB:btnTest"
id="ctrlA_ctrlB _DownButton"
src="Controls/<%=Session[&quot;imgPrefix &quot;]%>images/test.gif"
align="Middle" border="0" />

</code>

Anybody has a clue why the src attribute is rendered like this?

Thanks in advance,
Jeroen
Nov 18 '05 #1
2 1694
Have you checked whether your aspx page is asp compatable?

Freddy
"Jeroen Klooster" <je************ @hotmail.com> wrote in message
news:77******** *************** ***@posting.goo gle.com...
Hi all!

I'm having some trouble using user controls.

Situation:

An apsx page contains an user control (Control A) that contains
another user control(Control B). Control B is located in the subfolder
"Controls" and has some imagebutton server controls. I want to set the
imageurl of these image controls directly into the html using:

<code>

<ASP:IMAGEBUTTO N runat="server" id="btnTest"
imageurl='<%=Se ssion["imgprefix"]%>images/test.gif'/>

</code>

the html output from .NET :

<code>

<input type="image" name="ctrlA:ctr lB:btnTest"
id="ctrlA_ctrlB _DownButton"
src="Controls/<%=Session[&quot;imgPrefix &quot;]%>images/test.gif"
align="Middle" border="0" />

</code>

Anybody has a clue why the src attribute is rendered like this?

Thanks in advance,
Jeroen

Nov 18 '05 #2
you can not <%= %> inside a control tag. use the more restrictive <%# %>
-- bruce (sqlwork.com)
"Jeroen Klooster" <je************ @hotmail.com> wrote in message
news:77******** *************** ***@posting.goo gle.com...
Hi all!

I'm having some trouble using user controls.

Situation:

An apsx page contains an user control (Control A) that contains
another user control(Control B). Control B is located in the subfolder
"Controls" and has some imagebutton server controls. I want to set the
imageurl of these image controls directly into the html using:

<code>

<ASP:IMAGEBUTTO N runat="server" id="btnTest"
imageurl='<%=Se ssion["imgprefix"]%>images/test.gif'/>

</code>

the html output from .NET :

<code>

<input type="image" name="ctrlA:ctr lB:btnTest"
id="ctrlA_ctrlB _DownButton"
src="Controls/<%=Session[&quot;imgPrefix &quot;]%>images/test.gif"
align="Middle" border="0" />

</code>

Anybody has a clue why the src attribute is rendered like this?

Thanks in advance,
Jeroen

Nov 18 '05 #3

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

Similar topics

1
2038
by: David Berman | last post by:
I'm having a problem with the ImageButton class. I want to set the ImageURL to an asp page, like: Thumbnail.ImageURL = "getpicturefromdatabase.aspx?INDEX=52&GALLERY=12"; The problem is, when the control renders, it renders the url incoded as "getpicturefromdatabase.aspx?INDEX=52&amp;GALLERY=12" so the other page doesn't process the request correctly. I checked in the debugger and the value for the property looks to be exactly what I want...
3
1238
by: matthias s. | last post by:
Hi there, I'm building a usercontrol to provide language selection options. The availabe languages are retrieved dynamically and should be shown as flags (ImageButtons) in a table. But I've got a problem with formatting the whole thing. I'm using Response.Write statements to write the table. Here is a code snippet (the fat logic is omitted and I hope the variable names are selfexplanatory):
1
9272
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the Hyperlink control to create a graphical Hyperlink. However, I want to change the size of the image I am using, but the generated HTML places the width/height properties in the anchor tag rather than the image tag. Obviously I could write code to generate the anchor/image tags myself, but when a control as nice as the Hyperlink already exists I want to know if there is any kind of workaround that will...
5
2645
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever. The form can then be deployed to their intranet. The form designer is somewhat WYSIWYG but it contains a heap of 'edit', 'delete' and reordering buttons that are not seen when the form is acutally being used. I would love to have a preview...
3
10107
by: ramesh | last post by:
Hi all, I am facing a problem with the rendering of html into a windows application (C# .NET). I am trying with two possible approaches: 1. Use a control that directly renders the html into windows form, but it should not be dependent on IE or mshtml. I didn't get such kind of control so far. Can any one help on this? 2. Use a third party Html to Rtf converter and render the rtf in
0
1430
by: Juan R. | last post by:
Since the idea of encoding mathematics using MathML is being very far from popular due to a number of factors -expensive tools, bad accesibility of generated code, unusual verbosity, lack of adequate support, special fonts, namespaces, special plugins, backward incompatiblity of MathML with other internet technologies, duplication of code, and others-, alternative encodings are spreading over the internet. Probably the most popular one...
1
2685
by: Ricardo Quintanilla G. | last post by:
how to override the rendering method of a whole asp.net applicaction? i want to not include spaces between html elements. As example, then rendering produce that: == == == == <html> <body> <p>Welcome</p> <p>to my app</p>
0
1612
by: pabloazorin | last post by:
I developed a Date Picker web control using C# and .net framework 1.1 I added my control to Visual Studio 2003 IDE toolbar. When I drag and drop my control to design web page, the control renders correctly. If I change to HTML the generated html is <cc1:IT24DateTime id="IT24DateTime1" runat="server" Type="Date"></cc1:IT24DateTime> .... and that works correctly.
2
2253
by: mikeachamberlain | last post by:
Hi. I have an <asp:Imagecontrol in which I am databinding the ImageURL attribute. The URL is another ASPX page that provides the binary source of the image, The problem is that ASP.NET is insisting on HTML encoding the URL string, so the ampersands in the querystring are converted to &amps. As a simple example of this, consider the following:
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10782
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10500
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9323
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7753
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3078
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.