Lindsay Donaghe's Library tagged → View Popular
Why ASP.NET AJAX UpdatePanels are dangerous | Encosia
Good arguments against over-use of UpdatePanels and some sample script of how to replace their functionality with JSON calls.
-
<asp:ScriptManager ID="ScriptManager1" runat="server"
EnablePageMethods="true" />
<script language="javascript">
function UpdateTime() {
PageMethods.GetCurrentDate(OnSucceeded, OnFailed);
}
function OnSucceeded(result, userContext, methodName) {
$get('Label1').innerHTML = result;
}
function OnFailed(error, userContext, methodName) {
$get('Label1').innerHTML = "An error occured.";
}
</script>
<asp:Label runat="server" ID="Label1" Text="Update Me!" /><br />
<input type="button" id="Button2" value="Web Method Update"
onclick="UpdateTime();" /> -
[WebMethod]
public static string GetCurrentDate()
{
return DateTime.Now.ToLongDateString();
}
UFrame: goodness of UpdatePanel and IFRAME combined - Omar AL Zabir blog on ASP.NET Ajax and .NET 3.5
A replacement for UpdatePanel in ASP.Net that lets you basically create an iFrame in the HTML using a div instead so the page is able to interact with the parent page's DOM. An option for cross-domain page embedding as well. Worth playing with.
Kyle Baley - The Coding Hillbilly
A good blog on .Net and ASP.Net programming topics plus a bit of country humor.
IHTTPModule vs IHTTPHandler
An article on how to use IHttpModule to do url rewriting (pretty urls) that explains the difference between IHttpModule and IHttpHandler and where they fit in the ASP.Net request/response lifecycle.
Hot Scripts :: The net's largest PHP, CGI, Perl, JavaScript and ASP script collection and resource web portal
Code snippet archive with various web development language scripts to download.
ASP.NET Tip: Render Control into HTML String
Handy codesnippet to render a control to html. The trick was getting your own HtmlTextWriter instance...
-
using System.Text;
using System.IO;
using System.Web.UI; -
public string RenderControl(Control ctrl)
{
StringBuilder sb = new StringBuilder();
StringWriter tw = new StringWriter(sb);
HtmlTextWriter hw = new HtmlTextWriter(tw);
ctrl.RenderControl(hw);
return sb.ToString();
}
ASP.NET 3.5 Extensions > ASP.NET Model View Controller Applications > URL Routing with MVC
The "official" documentation on url routing in MVC which I'm currently trying to grok.
MVC On II6 Without the ".mvc" Extension - ASP.NET Forums
This thread has some instructions on how to use the IIRF plugin for rewriting the urls for MVC. May have to implement this soon.
-
- Make sure the .Net 3.5 Framework is installed.
- Find IsapiRewrite4.dll and IsapiRewrite4.ini at http://cheeso.members.winisp.net/IIRF.aspx
- Copy the IsapiRewrite4.dll and IsapiRewrite4.ini file to a
directory of your choosing on the target web server. We've been using %WINDIR%\system32\inetsrv\System32\inetsrv MAKE SURE YOU PUT BOTH FILES IN THE SAME DIRECTORY!!! - Click the Configuration button under the Virtual
Directory/Website tab and add a mapping for .mvc mapping to .Net 2.0
framework. The extension is .mvc, use Limit to: GET, POST, HEAD, and
make sure that "Verify that file exists" is UNCHECKED - Install the IIRF isapi filter at the "Web Site" level using the information on where you installed it from above.
- Restart the World Wide Web Publishing service
Sorry this took so long to get out to you, but here is a walk through of getting this working: (note, please don't be offended by the bolding, it's for internal devs who don't always read docs well

Here's our IsapiRewrite.ini file:
1 RewriteLogLevel 3
2 RewriteLog c:\logs\IIRF\rewrite
3
4 #This will rewrite one level deep if you are on localhost. In other words
5 #if your url is http://localhost/MyDevEnvironment/[controller]/[action]/[id] it will
6 #be able to rewrite it to http://localhost/MyDevEnvironment/[controller].mvc/[action]/[id]
7 RewriteCond %{HTTP_HOST} ^.*localhost.*$
8 RewriteRule (?!.*\..*)^/([^/.]+)/([^/.]+)(.*)$ /$1/$2.mvc$3 [L]
9
10 #This will rewrite root level if you are NOT on localhost. In other words
11 #if your url is http://www.HeyThisIsACoolMVCSite.com/[controller]/[action]/[id] it will
12 #be able to rewrite it to http://www.HeyThisIsACoolMVCSite.org/[controller].mvc/[action]/[id]
13 RewriteCond %{HTTP_HOST} ^(?!.*localhost.*)$
14 RewriteRule (?!.*\..*)^/([^/.]+)(.*)$ /$1.mvc$2 [L]Let me know if you need any help or have any more questions...
- Make sure the .Net 3.5 Framework is installed.
Ionics Isapi Rewrite Filter - Home
An Isapi filter that provides the functionality of mod_rewrite for Apache to IIS. It also allows you to specify regular expressions for filtering and it's free and opensource.
How to enable pretty urls with Asp.Net MVC and IIS6 : Bia Securities
Even though MVC works fine from the default web, it has problems with virtual directories and requires using the wildcard or something like the routing solution suggested here.
Jeff Meyer's Blog - Deployment Fun with ASP.Net MVC Preview 2
Jeff describes his workarounds for some of the deployment issues with ASP.Net MVC CTP 2 on an ISP using a Virtual Directory.
AJAX Control Toolkit
The place to grab the latest ASP.Net Ajax Toolkit, including the latest for .Net 3.5
Krugle - Code Search for Developers
A repository site for code snippets that also has an Enterprise version of it's products that will make your compay codebase searchable. They have an Eclipse plugin and an open API for IDE integration.
Screen Scraping, ViewState, and Authentication using ASP.Net
A tutorial on how to pass through viewstate and authentication when trying to create a proxy for ASP.Net pages using WebClient.
5 signs your ASP.NET application may be vulnerable to HTML injection » DamienG
Article with examples of how to use Html encoding to prevent succeptability to XSS in ASP.Net web pages.
... In Which We Discuss HTML-Encoding : Rob Conery
Discussion and some responses about HTML encoding in MVC as a means to prevent XSS. Gives some good links to XSS examples and resources.
Steve Sanderson’s blog » Blog Archive » ASP.NET MVC: Prevent XSS with automatic HTML encoding
Tutorial with demo code you can use to change the default behavior of <%= ... %> so that the output is Html encoded. Useful for prevention of XSS but not tested in many situations yet for robustness.
Blocking Direct Access To Views in ASP.NET MVC
Handy bit of code in web.config to prevent people from navigating directly to a view.
Using jQuery to Consume ASP.NET JSON Web Services | Encosia
There's a snippet here about what Ajax settings to use for JQuery communicating with ASP.Net.
Cutting Edge: AJAX application architecture, Part 2
An article on the two different approaches to using Ajax with ASP.Net including some caveats and security issues.
Selected Tags
Related Tags
Sponsored Links
Top Contributors
Groups interested in asp.net
-
.NET Programming Services, ASP.NET Web Programming, .NET Application Development
Outsourcing .NET Programmin...
Items: 1 | Visits: 59
Created by: outsourcingops
-
eBooks Space for download FREE!!
Many eBooks files Space for...
Items: 1 | Visits: 72
Created by: Kim So Hee
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo
