I have an issue i can work around, but i'm trying to figure out what i'm
"supposed" to do.
i have a line of HTML/ASP.NET code inside a repeater that is something like
this
<a href="page.aspx ?s=<%# DataBinder.Eval (Container, "DataItem.TheDa ta")
%>">Text</a>
This code executes perfectly, and does exactly what i want. When i try to
switch from HTML view to Design view, VS.NET2003 yells at me saying i need
to quote something differently. So, i figured i'd change the quotes...
well.. i can't change the "DataItem.TheDa ta" to 'DataItem.TheDa ta' because
thats a C# character literal, but with too many characters, and it doesn't
like that. I can change the "page.aspx? s= ... "> to be 'page.aspx?s=.. .'>
but that breaks some of my links that actually have the ' character in their
address.
So what do i do?
Whats the "proper" way to do this so i can actually switch back and forth
between HTML view and Design view without any hassle?
Thanks in advance!
Tim 7 1867
Attaching something i use currently.... doesnt give me the annoying quotes
message
<asp:TemplateCo lumn>
<ItemTemplate >
<P align="center">
<asp:HyperLin k ImageUrl="../Images/edit.gif" NavigateUrl='<% #
"CA_EditSubCate gory.aspx?SubCa tID=" +
DataBinder.Eval (Container.Data Item,"SubCatego ryID") %>' runat="server"
ID="Hyperlink1 "/>
</P>
</ItemTemplate>
</asp:TemplateCol umn>
HTH
HD
"Tim Mulholland" <Mu************ ***@alumni.virg inia.edu> wrote in message
news:OS******** ******@tk2msftn gp13.phx.gbl... I have an issue i can work around, but i'm trying to figure out what i'm "supposed" to do.
i have a line of HTML/ASP.NET code inside a repeater that is something
like this
<a href="page.aspx ?s=<%# DataBinder.Eval (Container, "DataItem.TheDa ta") %>">Text</a>
This code executes perfectly, and does exactly what i want. When i try to switch from HTML view to Design view, VS.NET2003 yells at me saying i need to quote something differently. So, i figured i'd change the quotes... well.. i can't change the "DataItem.TheDa ta" to 'DataItem.TheDa ta' because thats a C# character literal, but with too many characters, and it doesn't like that. I can change the "page.aspx? s= ... "> to be 'page.aspx?s=.. .'> but that breaks some of my links that actually have the ' character in
their address. So what do i do? Whats the "proper" way to do this so i can actually switch back and forth between HTML view and Design view without any hassle?
Thanks in advance!
Tim
i don't have my code here in front of me, but i'm guessing that this code
will output an anchor tag with double quotes around the href instead of
single quotes? I ask because you have single quotes around the NavigateUrl
property and i just want to make sure (though, i guess i'm just being lazy
and i could test it myself when i get home - but i figured i'd ask :) )
Thanks for your help
Tim
"Hermit Dave" <he************ @CAPS.AND.DOTS. hotmail.com> wrote in message
news:ON******** ******@TK2MSFTN GP10.phx.gbl... Attaching something i use currently.... doesnt give me the annoying quotes message
<asp:TemplateCo lumn> <ItemTemplate > <P align="center"> <asp:HyperLin k ImageUrl="../Images/edit.gif" NavigateUrl='<% # "CA_EditSubCate gory.aspx?SubCa tID=" + DataBinder.Eval (Container.Data Item,"SubCatego ryID") %>' runat="server" ID="Hyperlink1 "/> </P> </ItemTemplate> </asp:TemplateCol umn>
HTH
HD
"Tim Mulholland" <Mu************ ***@alumni.virg inia.edu> wrote in message news:OS******** ******@tk2msftn gp13.phx.gbl... I have an issue i can work around, but i'm trying to figure out what i'm "supposed" to do.
i have a line of HTML/ASP.NET code inside a repeater that is something like this
<a href="page.aspx ?s=<%# DataBinder.Eval (Container, "DataItem.TheDa ta") %>">Text</a>
This code executes perfectly, and does exactly what i want. When i try
to switch from HTML view to Design view, VS.NET2003 yells at me saying i
need to quote something differently. So, i figured i'd change the quotes... well.. i can't change the "DataItem.TheDa ta" to 'DataItem.TheDa ta'
because thats a C# character literal, but with too many characters, and it
doesn't like that. I can change the "page.aspx? s= ... "> to be
'page.aspx?s=.. .'> but that breaks some of my links that actually have the ' character in their address. So what do i do? Whats the "proper" way to do this so i can actually switch back and
forth between HTML view and Design view without any hassle?
Thanks in advance!
Tim
href can be assigned a URL string with a single quote ' or a double quote ".
no issues bout that
Chao,
HD
"Tim Mulholland" <Mu************ ***@alumni.virg inia.edu> wrote in message
news:eu******** ******@TK2MSFTN GP10.phx.gbl... i don't have my code here in front of me, but i'm guessing that this code will output an anchor tag with double quotes around the href instead of single quotes? I ask because you have single quotes around the NavigateUrl property and i just want to make sure (though, i guess i'm just being lazy and i could test it myself when i get home - but i figured i'd ask :) )
Thanks for your help
Tim
"Hermit Dave" <he************ @CAPS.AND.DOTS. hotmail.com> wrote in message news:ON******** ******@TK2MSFTN GP10.phx.gbl... Attaching something i use currently.... doesnt give me the annoying
quotes message
<asp:TemplateCo lumn> <ItemTemplate > <P align="center"> <asp:HyperLin k ImageUrl="../Images/edit.gif" NavigateUrl='<% # "CA_EditSubCate gory.aspx?SubCa tID=" + DataBinder.Eval (Container.Data Item,"SubCatego ryID") %>' runat="server" ID="Hyperlink1 "/> </P> </ItemTemplate> </asp:TemplateCol umn>
HTH
HD
"Tim Mulholland" <Mu************ ***@alumni.virg inia.edu> wrote in
message news:OS******** ******@tk2msftn gp13.phx.gbl... I have an issue i can work around, but i'm trying to figure out what
i'm "supposed" to do.
i have a line of HTML/ASP.NET code inside a repeater that is something like this
<a href="page.aspx ?s=<%# DataBinder.Eval (Container,
"DataItem.TheDa ta") %>">Text</a>
This code executes perfectly, and does exactly what i want. When i try to switch from HTML view to Design view, VS.NET2003 yells at me saying i need to quote something differently. So, i figured i'd change the quotes... well.. i can't change the "DataItem.TheDa ta" to 'DataItem.TheDa ta' because thats a C# character literal, but with too many characters, and it doesn't like that. I can change the "page.aspx? s= ... "> to be 'page.aspx?s=.. .'> but that breaks some of my links that actually have the ' character in
their address. So what do i do? Whats the "proper" way to do this so i can actually switch back and forth between HTML view and Design view without any hassle?
Thanks in advance!
Tim
Hi Tim,
Thank you for using Microsoft Newsgroup Service. As for the question you
mentioned, I think Hermit's suggestion is quite correct. In case that you
want to use some quote ("") in the <%# %> bound, you should use '' to
include the <%# %> rather than use "", For example:
<ItemTemplate >
<asp:HyperLin k NavigateUrl='<% # "target.aspx?id ="
+DataBinder.Eva l(Container.Dat aItem,"id")%>' runat="server"
ID="lnkNav">vie w</asp:HyperLink>
</ItemTemplate>
But be careful that don't include other text in the '' beside the <%# %>,
such as:
<asp:HyperLin k NavigateUrl='ot her text<%# "target.aspx?id ="
+DataBinder.Eva l(Container.Dat aItem,"id")%>' runat="server"
ID="lnkNav">vie w</asp:HyperLink>
That'll cause all the expression between '' be analyzed as a normal string.
The <%# ........%> bound will be output as plain text.
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Hi Tim,
Have you tried my suggestion in the last reply or have you resolved your
problem? Please feel free to let me know if you have any problem on it.
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
was finally able to test it, and yes, it works fine.
thanks to all
"MSFT" <v-******@online.m icrosoft.com> wrote in message
news:0I******** ******@cpmsftng xa07.phx.gbl... Hi Tim,
Have you tried my suggestion in the last reply or have you resolved your problem? Please feel free to let me know if you have any problem on it.
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Hi Tim,
Thanks for your response. I'm glad that you've resolved the problem.
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nick Messick |
last post by:
I have a multi step signup form that I'm building and I have the
following question. Should I do it this way:
<?php
if (blah == 1) {
?><table><td width="100">........etc
<?php } else { ?>
<table><td width="100">........etc
<?php } ?>
|
by: Rainmaker |
last post by:
Greetings,
I have not been able to find the documentation that will allow me to
insert
php code inside the html code in the $message block in the mail() function.
Using the example in the help file:
<?php
/* recipients */
$to = "valid@email.add" . ", " ; // note the comma
$to .= $_POST;
|
by: wald |
last post by:
Hi group,
I've set up an agenda-like system where "admins" can enter upcoming
events, including a description of the event. This description can
include HTML formatting and is entered in a <textarea>.
The problem I'm facing is this: suppose an "admin" enters a description,
but one of the attributes of a HTML tag doesn't have a closing double
quote.
An example:
|
by: Ron |
last post by:
Hello, I'm having an aggravating time getting the "html" spewed by Word
2003 to display correctly in a webpage.
The situation here is that the people creating the documents only know
Word, and aren't very computer savvy. I created a system where they
can save their Word documents as "html" and upload them to a certain
directory, and the web page dynamically runs them through tidylib using
the tidy extension to php4, thus causing the...
|
by: Craig Hunt |
last post by:
I posted this in another newsgroup, so please forgive me if you've already
seen it.
---
Am I missing something here?
Quite frequently, I'll write an aspx document taking care to format the HTML
so that I and others on my team can read it. <sarcasm>We kind of like to
know what's going on when we come back to the document later.</sarcasm> In
any case, the editor, when switching from HTML view to the designer view
| |
by: desi.american |
last post by:
I have a dynamically generates ASPX page with tables and data.
Depending on user selection, the same page can be viewed as a simple
web page (rendered in HTML) or as an excel spreadsheet.
If the user chooses to view the page as an excel sheet, I attach the
following line of code in C# in the Page_Load method.
Response.ContentType = "application/vnd.ms-excel";
All this works fine. But some of cells read nvarchar fields from a
database...
|
by: PapaRandy |
last post by:
Hello,
I am trying to validate the following .py webpage as HTML (through
W3C).
I put:
-----------------------------------------------------------------------------
print "Content-type: text/html; charset=utf-8"
|
by: csgraham74 |
last post by:
Hi Guys,
I was wondering if someone could help me with a problem that im having.
Basically i have a html editor control and im using this to allow my
colleague to create html documents. I want to save this html info as a
string into my database. the problem arises however due to quotation
marks both double and single within my html. I have seen html before
where it does not have the actual quotation mark but somethinp like
"&lquo" ...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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...
| |
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: 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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |