Hello,
In Asp, you can render a server side variable inside the quotes in an html
element attribute. For example:
<link rel="stylesheet " href="<%=SomeVa riableName%>" type="text/css">
I'm trying to do something similar in Asp.Net:
<link rel="stylesheet " href="<SomePlac eholderControl runat=server>"
type="text/css">
However, Asp.Net sees the characters inside the quotes as literal text. Is
there a way to put a server side control inside the quotes?
Thanks,
John 4 2190
Why would you want to do this?
"John Lau" <jo*****@olc.ub c.ca> wrote in message
news:#2******** ******@TK2MSFTN GP09.phx.gbl... Hello,
In Asp, you can render a server side variable inside the quotes in an html element attribute. For example:
<link rel="stylesheet " href="<%=SomeVa riableName%>" type="text/css">
I'm trying to do something similar in Asp.Net:
<link rel="stylesheet " href="<SomePlac eholderControl runat=server>" type="text/css">
However, Asp.Net sees the characters inside the quotes as literal text.
Is there a way to put a server side control inside the quotes?
Thanks, John
We're migrating our Asp websites to Asp.net. Most of our designers and
developers have never seen Asp.net, so phase one is just a port. Phase two
will be a rewrite.
John
"Peter Rilling" <pe***@nospam.r illing.net> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Why would you want to do this?
"John Lau" <jo*****@olc.ub c.ca> wrote in message news:#2******** ******@TK2MSFTN GP09.phx.gbl... Hello,
In Asp, you can render a server side variable inside the quotes in an
html element attribute. For example:
<link rel="stylesheet " href="<%=SomeVa riableName%>" type="text/css">
I'm trying to do something similar in Asp.Net:
<link rel="stylesheet " href="<SomePlac eholderControl runat=server>" type="text/css">
However, Asp.Net sees the characters inside the quotes as literal text. Is there a way to put a server side control inside the quotes?
Thanks, John
ASP.NET still supports inline code.
But as for your original questions, probably not. I have never seen this
done, simply because server-side controls are tags and attributes are only
constant values.
"John Lau" <jo*****@olc.ub c.ca> wrote in message
news:e$******** ******@TK2MSFTN GP12.phx.gbl... We're migrating our Asp websites to Asp.net. Most of our designers and developers have never seen Asp.net, so phase one is just a port. Phase
two will be a rewrite.
John "Peter Rilling" <pe***@nospam.r illing.net> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Why would you want to do this?
"John Lau" <jo*****@olc.ub c.ca> wrote in message news:#2******** ******@TK2MSFTN GP09.phx.gbl... Hello,
In Asp, you can render a server side variable inside the quotes in an html element attribute. For example:
<link rel="stylesheet " href="<%=SomeVa riableName%>" type="text/css">
I'm trying to do something similar in Asp.Net:
<link rel="stylesheet " href="<SomePlac eholderControl runat=server>" type="text/css">
However, Asp.Net sees the characters inside the quotes as literal
text. Is there a way to put a server side control inside the quotes?
Thanks, John
Yes, I noticed it still supports inline code.
Thanks, John
"Peter Rilling" <pe***@nospam.r illing.net> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. ASP.NET still supports inline code.
But as for your original questions, probably not. I have never seen this done, simply because server-side controls are tags and attributes are only constant values.
"John Lau" <jo*****@olc.ub c.ca> wrote in message news:e$******** ******@TK2MSFTN GP12.phx.gbl... We're migrating our Asp websites to Asp.net. Most of our designers and developers have never seen Asp.net, so phase one is just a port. Phase two will be a rewrite.
John "Peter Rilling" <pe***@nospam.r illing.net> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Why would you want to do this?
"John Lau" <jo*****@olc.ub c.ca> wrote in message news:#2******** ******@TK2MSFTN GP09.phx.gbl... > Hello, > > In Asp, you can render a server side variable inside the quotes in
an html > element attribute. For example: > > <link rel="stylesheet " href="<%=SomeVa riableName%>" type="text/css"> > > I'm trying to do something similar in Asp.Net: > > <link rel="stylesheet " href="<SomePlac eholderControl runat=server>" > type="text/css"> > > However, Asp.Net sees the characters inside the quotes as literal text. Is > there a way to put a server side control inside the quotes? > > Thanks, > John > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: OJ |
last post by:
Hey,
I'm trying to make a right justified, bullet on the right, list. The
only way that I've found is to use the "direction" attribute:
<style>
ul.rtl {
direction: rtl;
}
</style>
<ul class="rtl">
|
by: Hazzard |
last post by:
I just realized that the code I inherited is using all asp.net server
controls (ie. webform controls) and when I try to update textboxes on the
client side, I lose the new value of the textbox when submitting the form to
update the database. The server doesn't have the client side value any more.
It seems to me that as I begin to write the client side javacript code for
form validation and client side editing capabilities in order to save...
|
by: Sue |
last post by:
Is there such an animal as a frameset/frames server-side
webcontrol or htmlcontrol? I have a frameset with two
frames - one contains an aspx page with asp buttons that
has to do some updating, then change the aspx in the
second frame to another aspx. I've been trying various
ideas without success. Is there no way to do this on the
server side? Perplexed and wanting to drop kick this darn
app into orbit elsewhere.... tia, Sue
|
by: Tom wilson |
last post by:
I'm trying to create dynamic controls in ASP.Net. It's driving me
nuts. I keep getting the error:
Control '16' of type 'RadioButton' must be placed inside a form tag
with runat=server.
Dim Place1 As New PlaceHolder
Controls.Add(Place1)
For y = 1 To Choices.RecordCount
Choices.MoveTo(y)
|
by: The Developer |
last post by:
Hi All,
I have a web application where I am adding a custom attribute to my ASP.NET
text box control and changing value of that attribute at client side using
JavaScript. My problem is that changed value of that custom attribute is not
reflecting back at server side. Any ideas about this problem?
Server side code:
private void Page_Load(object sender, EventArgs e)
{
if (this.IsPostBack == false)
| |
by: serge calderara |
last post by:
Dear all,
I am new in asp.net and prepare myself for exam
I still have dificulties to understand the difference between server control
and HTML control.
Okey things whcih are clear are the fact that for server control component ,
code is running on the server side.
But if I take as example a Label. I place on a webform an HTM label control
and a WebForm label control, I could see that properties are different for
|
by: Jobs |
last post by:
Download the JAVA , .NET and SQL Server interview with answers
Download the JAVA , .NET and SQL Server interview sheet and rate
yourself. This will help you judge yourself are you really worth of
attending interviews. If you own a company best way to judge if the
candidate is worth of it.
http://www.questpond.com/InterviewRatingSheet.zip
|
by: pbd22 |
last post by:
Hi.
How do I add the runat=server attribute on a buttonfield link
dynamically?
thanks!
|
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,...
|
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...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |