473,395 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

problem with quotes in vs.net

I have this piece of code that give me problem in vs.net html design
mode.

<A href="javascript:launchMeterDlg('<%=Me.bid%>','<%#
DataBinder.Eval(Container, "DataItem.MeterID") %>')">

while this work prefectly well when I tested. How i can make this work
in design mode as well?

Thanks
Nov 18 '05 #1
4 1102
Henry

Unfortunately Design view does not handle well nested double quotes, even if
you put them inside single quotes. Try to write the same code differently,
avoiding quote nesting.

Thanks
Mikhail Arkhipov (MSFT)
------------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.

"Henry Tam" <h_***@yahoo.com> wrote in message
news:79**************************@posting.google.c om...
I have this piece of code that give me problem in vs.net html design
mode.

<A href="javascript:launchMeterDlg('<%=Me.bid%>','<%#
DataBinder.Eval(Container, "DataItem.MeterID") %>')">

while this work prefectly well when I tested. How i can make this work
in design mode as well?

Thanks

Nov 18 '05 #2
Hi h_tam,

Thank you for using Microsoft Newsgroup Service. As for the question you
mentioned, here is my suggestion:
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:HyperLink NavigateUrl='<%# "target.aspx?id="
+DataBinder.Eval(Container.DataItem,"id")%>' runat="server"
ID="lnkNav">view</asp:HyperLink>

</ItemTemplate>

But be careful that don't include other text in the '' beside the <%# %>,
such as:

<asp:HyperLink NavigateUrl='other text<%# "target.aspx?id="
+DataBinder.Eval(Container.DataItem,"id")%>' runat="server"
ID="lnkNav">view</asp:HyperLink>

That'll cause all the expression between '' be analyzed as a normal string.
The <%# ........%> bound will be output as plain text.

In addition, if your expression is too complex which contains more than two
hierarchy of quote, I think there does exist some limit on analysis the
quotes for VS.NET IDE.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Nov 18 '05 #3
THANKS! It work very well. I have been thinking too much. It is much
easier than I thought.

Here is the modification to my orginal piece:

<A href='<%# "javascript:launchMeterDlg(""" + Me.bid +""","""+
DataBinder.Eval(Container, "DataItem.MeterID").ToString() +""")" %>'>

btw. I am also impress with your support response time.

Thanks again.

Henry

v-******@online.microsoft.com (MSFT) wrote in message news:<BR**************@cpmsftngxa07.phx.gbl>...
Hi h_tam,

Thank you for using Microsoft Newsgroup Service. As for the question you
mentioned, here is my suggestion:
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:HyperLink NavigateUrl='<%# "target.aspx?id="
+DataBinder.Eval(Container.DataItem,"id")%>' runat="server"
ID="lnkNav">view</asp:HyperLink>

Nov 18 '05 #4
Hi h_tam,

Congratulations! I'm glad that my suggestion has worked for you. Also,
thanks for your support!

Nov 18 '05 #5

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

Similar topics

6
by: Randy Jackson | last post by:
Hello everyone. First of all, apologies in advance if this is a question that gets asked all the time. I tried to search, but wasn't really sure exactly what to search for. Anyway, here's...
1
by: Aaron | last post by:
how would i use document.write to write this input box? i can do it without quotes but i need them for my purpose <input type="textbox" name="input" value="something"> i did this but it...
4
by: lharby | last post by:
I'm hoping this is very simple. I am currently using a random quote generator on our intranet. I have 17 quotes, when I add in an 18th and change the makeArray number the code seems not to work....
1
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no...
5
by: suslikovich | last post by:
Hi everyone, I have a problem synchronizing two list boxes on a form. I want to display information in the second box based on the selection in the first box. First box (List0)lists all company...
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
5
by: Tim::.. | last post by:
Can someone tell me how I convert this simple SQL statement so I can use it in ASP.NET??? I have an issue with the quotation marks and wondered if there is a simple rule for converting the sql...
4
by: Joe | last post by:
I have a 'random quotes' plugin that I use which reads tab delimited quotes from multiple text files in a directory, and then randomly displays one. Each text file contains multiple lines, each...
23
by: Haines Brown | last post by:
I tried changing font-family from helvetica to arial and discovered that I loose typographic quotes, etc. (for example, if I have “ in a page, the double opening quotation mark is not curly). ...
15
by: abracad_1999 | last post by:
I am trying to populate a table with the following insert query run through phpmyadmin. When I attempt to run it phpmyadmin just freezes. After a while "Fatal error: Maximum execution time of 300...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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,...

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.