.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Undetermined literal error when a value contains double quotes

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

Hi I need to pass some information in a javascript function when an image link is clicked in a datagrid.  When values in a certain column called 

itemcode contain double quotes then I get the subject error. Is there any way to get rid of the double quotes in this line directly

'<%#Eval("ItemCode")%>' ?

Here is the full code:

                <img style="border:0" 

View Complete Post

More Related Resource Links

two adjacent double quotes in json causes blue screen by JavaScriptSerializer

Hello, I am using System.Web.Script.Serialization.JavaScriptSerializer to deserialize  http requests.  I get the blue screen when the contents I am deserializing has two double quotes, for example:  ""country"". Is there a fix for this?  Currently I replace the "" with a special string and then I deserialization, then I put back the "".  I do this for a given field in the object which I've seen comes in with ""s.  The problem is that I should be doing this for all fields in the input json.  This is a lot of extra code to write as I could be deserializing many different types of Json objects.  The "" is needed by the client to specify a quoted string, so I can't ask for the input to be changed. Any help on this subject would be really appreciated. Many thanks.     I am using .Net framework 3.5.

ERROR-Conversion from string "'," to type 'Double' is not valid



I am having  badly stuck!!I have spent hours in trying to solve that.

I am having the following loving function:


   Public Function InsertDeleteUpdate(ByVal command As String) As Boolean
            cmd.Connection = objectconnection
            cmd.CommandText = command
            Return True
        Catch ex As Exception
            Return False
End Try

 In the above function I pass the following string:

gridcost = Convert.ToDecimal(txtcost.Text)
_date = Convert.ToDateTime(txtdatefrom.Text)
patient = Convert.ToInt32(ddlpatients.SelectedValue)

 sqlstring = "execute dbo.InsertDeleteUpdate " & patient & ",'" & _date + "'," & gridcost & ",'" & txtinsurances.Text & "','" & checkreceipt.Checked + "'," & appointment_xid

The string includes a stored procedure.The store procedure includes the following parameters:

Unbalanced Double Quotes " in CSV Generated From Reporting Services 2008

I have a data driven subscription which runs a reporting services report and generates the results as a csv file.

One of the field values inlcudes a double quote : Bread Tortilla Flour 10".

In SSRS 2005 this is correctly extracted to the csv as "Bread Tortilla Flour 10""". That is the value is placed in double quotes and the double quote itself is balanced with a second.

In SSRS 2008 this is extracted as "Bread Tortilla Flour 10"" which leaves an unblanced quote and makes the rest of the file unreadable.

Is this a bug - or do we have an incorrect setting. The report has been migrated directly from 2005 to 2008.

Literal Error when trying to pass custom types to my workflow



I have a simple procedural workflow that determines how to assign a real estate lead to an agent. It takes three input parameters, and 1 output parameter. The only unusual aspect of this activity, (if you call it unusual), is that I'm passing in complex objects rather than types. I've created a lead and agent objects like this:

    public class LeadProxy
        public int PK { get; set; }
        public int Amount { get; set; }


    public class AgentProxy
        public int PK { get; set; }
        public int Senority { get; set; }
        public int CurrentLeadCount { get; set; }

My current input arguments are:

    <x:Property Name="Agents" Type="InArgument(scg:List(local:AgentProxy))" />
    <x:Property Name="Lead" Type="InArgument(local:LeadProxy)" />
    <x:Property Name="AssignToAgent" Type="OutArgument(local:AgentProxy)" />

Allowing double quotes in URL


Hi all,

I'm trying to get my URLs to contain double quotes (") and other special characters such as <, > etc in my MVC2 application. Here's an example:


The above would throw up a System.ArgumentException: Illegal characters in path.

Any chances that this can be done?

ODBC text driver doesn't read columns containing double quotes



I'm having some trouble with importing some information from a delimited text file into an SQL database. I made a DSN for the file using the  Microsoft ODBC driver. It reads most of the data fine. I can get most of it into the database, or using Excel I can display it in a table.

This is a regular text file, the delimiter is a "|" character. Some of the data has double quotes embedded in it. Every time it hits one of these double quotes, the rest of the information on that line are ignored.Then it will move on to the next line in the file.

Is there a way to set up the driver to read these quotes somehow, or to just ignore them?

Double Quotes in CSV File


I have a lot of data coming in from CSV files.  I have many CSV files (~20), with varying amounts of data- but some are quite large (largest file is ~230mb)

I'm trying to import it into a SQL database via SSIS, but the data is a little bit frustrating. 

I have data that looks like this:

"Text from vendor ""Vendor Name, Inc."" blah blah", "Next string", "", 1234

Many things to notice here - as well you can imagine some of the difficulties here.

After parsing, this data should have 4 columns-

Column1                                                                          Column2              Column3               Column4

Text From Vendor "Vendor Name, Inc." blah blah      Next string            <blank>    

Really Long JSON String wraps to multiple lines in source, creates unterminated String Literal error


I have an app that writes a JSON object to a string and registers a script block onto the page that client-side javascript then uses to build interface components.  I found that the javascript is working fine when the data set is small, but on large datasets, when I view the source, the JSON object string takes up a few lines because it is so long.  I didn't think anything of it until I started manually trying to recreate the "Unterminated String Literal Error", only to find that the error goes away when I format the JSON string to be a little more "readable".  What I discovered is that this does away with the automatic new line wrap, making the error go away. 

Make Sense?  Is there anything I can do about this?

#Eval in server side controls not working (ERROR:too many character in literal)



i have grideview and i want to bind silverlight media control as follow


<asp:Media...etc MediaSource="<%#Eval('Source')%>"




Using Double Quotes in a string


string  script = @" $(document).ready(function () { ";
                            script += @" $(#headerTop).css('background-color', " + color + "});";

I want to put #headerTop in double quotes. How to do that ?


IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


Handling 404 page not found with Error page



      How do i handle 404 page not found?

Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

Type or namespace error.


A couple of days ago I started getting an unusual behavior when compiling Website projects. I have referenced class libraries added to my bin folder that are also correctely referenced in using statements in my aspx.cs code behind. When I compile, I get the 

Error 4 The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?) C:\Dev\Fiscal_Portal\Implementation\FMS Portal Site_new\App_Code\BLL\DataTables.cs 1 7 C:\...\FMS Portal Site_new\

The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?)

error message that would typically be received when the dll has not been added as a reference or added in a using statement.

I can eliminate the error by adding an


HTTP Error 403 - Forbidden


(VB Express website directed me to ASP.NET Web Services which in turn redirected me to this forum).

 Hopefully someone can help me here...... 

I am using VIsual Web Developer and downloaded the small business application to use as a starting point to help my wife get a website up for her small business. When I load the application, I can F5 and it runs fine but as soon as I make any modification to the app and hit F5, I get the HTTP Error 403 - Forbidden when it tries to show the website.

I notice a pop up that occurs when I run that allows me to choose the link for my app and it displays correctly (I close the webpage that has the error on it).

This seems like a pain, is there a setting I'm missing - I would think that this should "just work".

What's up?????



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend