Click here to Skip to main content
15,892,059 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: urgent - problem with html tags in asp.net c# (code behind) Pin
Shameel5-Jul-11 8:24
professionalShameel5-Jul-11 8:24 
GeneralRe: urgent - problem with html tags in asp.net c# (code behind) Pin
Cyberoxy5-Jul-11 8:35
Cyberoxy5-Jul-11 8:35 
GeneralRe: urgent - problem with html tags in asp.net c# (code behind) Pin
Not Active5-Jul-11 8:45
mentorNot Active5-Jul-11 8:45 
GeneralRe: urgent - problem with html tags in asp.net c# (code behind) Pin
Cyberoxy5-Jul-11 8:40
Cyberoxy5-Jul-11 8:40 
GeneralRe: urgent - problem with html tags in asp.net c# (code behind) Pin
Shameel5-Jul-11 8:42
professionalShameel5-Jul-11 8:42 
GeneralRe: urgent - problem with html tags in asp.net c# (code behind) Pin
Not Active5-Jul-11 14:15
mentorNot Active5-Jul-11 14:15 
AnswerRe: urgent - problem with html tags in asp.net c# (code behind) Pin
berba6-Jul-11 20:38
berba6-Jul-11 20:38 
QuestionWebMethod called from Javascript mis-behaving Pin
markymark825-Jul-11 4:31
markymark825-Jul-11 4:31 
Hey guys,

Hoping someone might be able to shed some light on a problem I am currently having.

I have a WebMethod being called by some javascript code, everything is working as it should, the WebMethod is a static string.

I am writing the output (which contains a small amount of html) to a hyperlink on my page (I'm adding a product to a basket and updating the link to the basket with item total etc.).

On my local dev machine, and on a staging version of the website (a copy of live) this all works nicely, the hyperlink shows what it is supposed to. But when put live, the WebMethod is called fine, and the output comes out in JSON format. This in itself I didn't think was a problem as I can just use jquery to parse the JSON, but it fails in firefox as being invalid JSON.

What's even weirder is that when I created a 2nd test version of the page (a carbon copy, just with the name changed), that behaves perfectly on live, without the need for JSON parrsing.

This isn't a problem in all browsers, IE, Chrome (release) and the latest Safari all pop the raw JSON in as the hyperlink text, Firefox (4) seems to parse it and shows the correct HTML.

Can anyone think why it would behave differently between 2 identical pages, where only the name is slightly different, and what the best way to parse the JSON is when it is returned from the WebMethod. Does it have to come back as JSON, I know xml is an option but really I could do with just a string..

I tried clearing all of my temporary files, so I know it's not a caching issue.

Live server (and the staging one too):
Win Server 2003
IIS6

The website is .Net 3.5, C#

Thanks in advance!
QuestionCannot use a leading .. to exit above the top directory. Pin
benams4-Jul-11 13:41
benams4-Jul-11 13:41 
AnswerRe: Cannot use a leading .. to exit above the top directory. Pin
Not Active4-Jul-11 14:25
mentorNot Active4-Jul-11 14:25 
GeneralRe: Cannot use a leading .. to exit above the top directory. Pin
benams4-Jul-11 20:03
benams4-Jul-11 20:03 
GeneralRe: Cannot use a leading .. to exit above the top directory. Pin
Yuri Vital4-Jul-11 22:40
Yuri Vital4-Jul-11 22:40 
QuestionGet all the values from HttpContext.Current.Cache Pin
siva4553-Jul-11 20:15
siva4553-Jul-11 20:15 
AnswerRe: Get all the values from HttpContext.Current.Cache Pin
Andy_L_J3-Jul-11 20:32
Andy_L_J3-Jul-11 20:32 
SuggestionRe: Get all the values from HttpContext.Current.Cache [modified] Pin
RaviRanjanKr3-Jul-11 20:57
professionalRaviRanjanKr3-Jul-11 20:57 
GeneralRe: Get all the values from HttpContext.Current.Cache Pin
Not Active4-Jul-11 2:21
mentorNot Active4-Jul-11 2:21 
GeneralRe: Get all the values from HttpContext.Current.Cache Pin
RaviRanjanKr4-Jul-11 6:33
professionalRaviRanjanKr4-Jul-11 6:33 
QuestionOnly Save Contentpage Pin
Elham M2-Jul-11 6:03
Elham M2-Jul-11 6:03 
AnswerRe: Only Save Contentpage Pin
Not Active2-Jul-11 7:22
mentorNot Active2-Jul-11 7:22 
GeneralRe: Only Save Contentpage Pin
Elham M2-Jul-11 9:06
Elham M2-Jul-11 9:06 
GeneralRe: Only Save Contentpage Pin
Not Active2-Jul-11 10:02
mentorNot Active2-Jul-11 10:02 
GeneralRe: Only Save Contentpage Pin
Elham M3-Jul-11 6:21
Elham M3-Jul-11 6:21 
GeneralRe: Only Save Contentpage Pin
Not Active3-Jul-11 11:08
mentorNot Active3-Jul-11 11:08 
AnswerRe: Only Save Contentpage Pin
Shameel3-Jul-11 20:38
professionalShameel3-Jul-11 20:38 
GeneralRe: Only Save Contentpage Pin
Elham M3-Jul-11 23:46
Elham M3-Jul-11 23:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.