I need to post an xml string to another website. I can't create an xml file, because some of the content is dynamically created. The two lines that are causing me problems are
The conversion from double quotes to single quotes isn't being accepted. So how can I send the string so that the versions are surrounded by double quotes?
I am building an application where a quote is generated for a mini bus service. A user enters their postcode from which the location can be determined. This will in then calculate a quote by knowing the location of the user an the location of their destination. I have no idea where to start with this. I have been tol about google maps/api but do not know how they work.
I have a dropdownlist which gets the data from the oracle database, the values that contains quotes example "Apple's" or "Website's" or not getting seelcted from the list except these values remaining values have no issues.
Since both are acceptable by HTML as well as languages like ASP.NET and PHP when using attributes or strings, why is it that some people use single quotes and double quotes interchangeably? It is my understanding that it is syntactically correct to use double quotes where possible, single when you need to embed a double quote for inline logic. Is there something I am missing? For examples: HTML
I am using SQL Server 2008 Web Edition and it seems my SQL queries are automagically having the double quotes replaced with ' + CHAR(34) + '. I am trying to pin down why this is happening, I am using Delphi with ASP.NET and using the ADO.NET object for the SQL.
I'm working in a Repeater over blog posts and I'm displaying a ShareThis JavaScript piece at the bottom. The Title and URL of the post are being sent to JS. In one test case, the title of a post has a single quote, e.g. Mark's test post Since I need to preserve that single quote when being sent to ShareThis, I need to wrap that JavaScript string in double quotes, however the string is being bound via a Literal and I cannot wrap the literal in double quotes: This is want I want but DOES NOT WORK:
im using asp.net and somehow my escape characters dont seem to work
string testing = "my name is "abc"";
this gives the output : my name is "abc"
ive read all the tutorials, everywhere it says that ive to put " to use double quotes inside a string but i have no idea why my system isnt accepting the escape character.
System.Web.Script.Serialization.JavaScriptSerializer s = new System.Web.Script.Serialization.JavaScriptSerializer(); result = s.Deserialize<Hashtable>(data); Error is thrown if data is "{a:""test" 123",b:"hello" }" No error is thrown if data is "{a:"test 123",b:"hello" }"
How do I adjust the data string so that no error is thrown even when there are quotes?
I have a hyperlink in asp.net that I want to dynamically create. I also add additional attributes like onmouseover to call a javascript function. My problem is that instead of setting my attribute to
onmouseover="myJSFunc('param')"
it converts it to
onmouseover="myJSFunc('param')".
Any ideas how to get this to work in ASP.NET C#? EDIT:
These controls are in a repeater. This is what I have in my code behind;
n my datatable i am retrieving values which contain single quotes. .(eg: paul's, john's, raj's 199:LOQ etc. .) i want to replace these values with ''(double single quotes), so that these records can be inserted in the sqlserver database. . all these values are in single column.
I have the following HtmlHelper method that I want to create a button that does a redirect with JavaScript:
public static string JavaScriptButton(this HtmlHelper helper, string value, string action, string controller, object routeValues = null, object htmlAttributes = null) { var a = (new UrlHelper(helper.ViewContext.RequestContext)) .Action(action, controller, routeValues); var builder = new TagBuilder("input"); builder.Attributes.Add("type", "submit"); builder.Attributes.Add("value", value); builder.Attributes.Add("class", "button"); builder.Attributes.Add("onclick", string.Format("javascript:location.href='{0}'", a)); builder.MergeAttributes(new RouteValueDictionary(htmlAttributes)); return MvcHtmlString.Create(builder.ToString(TagRenderMode.SelfClosing)).ToString(); }
The problem is that the line that creates the onclick handler is getting escaped by the tagbuilder, the resulting html is: <input class="button" onclick="javascript:location.href=''" type="submit" value="Return to All Audits" />
I've been trying for ages. How do you read a csv into c# with line breaks and nested quotes. At first I was looking for paired quoted to denote a value, but you can have nested quotes!
i am developed on simple user registeration application in that i gave address field .when i am trying to enter something like this (1st main,b'lore) but wont take while inserting.
my query is
sqlcommand cmd=new sqlcommand("insert into registeration_form(name,address)values('"+txtname.text+"','"+txt_address+"')",con);
how can i pass the quotes also to my query if any one know reply me.
The problem is the double quotes wrapping everything under 'd'. Is there something I've missed in the web method or some other means of returning the data without the quotes? I don't really want to be stripping it out on the client everytime. Also I've seen other articles where this doesn't happen.
I have string. There are no items to show in this view of the "Personal Documents" then assign to string str variable string str ="There are no items to show in this view of the "Personal Documents" library" Now planning to replace "" and make it to actual string to str object. I tried below, but did not worked
str = str.Replace(@"",string.Empty);
I want str value should be string str ="There are no items to show in this view of the "Personal Documents" library" I need to find this string in another string. While searching into that string. I couldn't found because str contains "".