All Questions

407
votes
3answers
402507 views

Server.MapPath("."), Server.MapPath("~"), Server.MapPath(@"\"), Server.MapPath("/"). What is the difference?

Can anyone explain the difference between Server.MapPath("."), Server.MapPath("~"), Server.MapPath(@"\") and Server.MapPath("/")?
188
votes
7answers
175188 views

Parse JSON in C#

I'm trying to parse some JSON data from the Google AJAX Search API. I have this URL and I'd like to break it down so that the results are displayed. I've currently written this code, but I'm pretty lo...
437
votes
18answers
196921 views

jQuery $(document).ready and UpdatePanels?

I'm using jQuery to wire up some mouseover effects on elements that are inside an UpdatePanel. The events are bound in $(document).ready . For example: $(function() { $('div._Foo').bind("mous...
119
votes
6answers
88241 views

How to get Url Hash (#) from server side

I know on client side (javascript) you can use windows.location.hash but could not find anyway to access from the server side.
191
votes
8answers
64382 views

Is Response.End() considered harmful?

This KB Article says that ASP.NET's Response.End() aborts a thread. Reflector shows that it looks like this: public void End() { if (this._context.IsInCancellablePeriod) { Interna...
141
votes
20answers
314402 views

Deploying website: 500 - Internal server error

I am trying to deploy an ASP.NET application. I have deployed the site to IIS, but when visiting it with the browser, it shows me this: Server Error 500 - Internal server error. There is...
391
votes
15answers
186047 views

Can an ASP.NET MVC controller return an Image?

Can I create a Controller that simply returns an image asset? I would like to route this logic through a controller, whenever a URL such as the following is requested: www.mywebsite.com/resource/ima...
489
votes
9answers
87685 views

Compile Views in ASP.NET MVC

I want an msbuild task to compile the views so I can see if there are compile time errors at well... compile time. Any ideas?
178
votes
16answers
276209 views

Regex for password must contain at least eight characters, at least one number and both lower and uppercase letters and special characters

I want a regular expression to check that: A password contains at least eight characters, including at least one number and includes both lower and uppercase letters and special characters, for exam...
193
votes
5answers
55058 views

ASP.NET "special" tags

What is the official name for the "special" ASP.NET tags like this: <%# %> <%= %> <%@ %> <%$ %> I can't seem to figure out the conceptual or well known name for these, so I'...

Previous Next