Skip to main content

Lindsay Donaghe's Library tagged asp.net   View Popular

30 Sep 08

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.

encosia.com/...jax-updatepanels-are-dangerous - Preview

codesnippets asp.net ajax troubleshooting web development tutorials

  • <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();
    }
26 May 08

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.

msmvps.com/...panel-and-iframe-combined.aspx - Preview

asp.net mvc libraries downloads codesnippets web development

13 May 08

Kyle Baley - The Coding Hillbilly

A good blog on .Net and ASP.Net programming topics plus a bit of country humor.

codebetter.com/...default.aspx - Preview

blog web development .net asp.net

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.

www.kowitz.net/...ttpmodule-vs-ihttphandler.aspx - Preview

web development asp.net tutorials iis urls

12 May 08

ASP.NET Tip: Render Control into HTML String

Handy codesnippet to render a control to html. The trick was getting your own HtmlTextWriter instance...

blogs.x2line.com/...859.aspx - Preview

asp.net codesnippets web development

  • 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();
    }
09 May 08

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.

forums.asp.net/...2117962.aspx - Preview

asp.net iis urls mvc codesnippets web development

    •  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 Smile

      1. Make sure the .Net 3.5 Framework is installed.
      2. Find IsapiRewrite4.dll and IsapiRewrite4.ini at http://cheeso.members.winisp.net/IIRF.aspx
      3. 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!!!
      4. 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
      5. Install the IIRF isapi filter at the "Web Site" level using the information on where you installed it from above.
      6. Restart the World Wide Web Publishing service

      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... 

       

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.

www.codeplex.com/IIRF - Preview

asp.net iis urls systemsengineering web development library downloads free opensource

08 May 08

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.

biasecurities.com/...urls-with-asp-net-mvc-and-iis6 - Preview

asp.net mvc routing web development codesnippets troubleshooting urls iis

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.

jeffmeyer.name/...tFunWithASPNetMVCPreview2.aspx - Preview

asp.net mvc web development troubleshooting iis

AJAX Control Toolkit

The place to grab the latest ASP.Net Ajax Toolkit, including the latest for .Net 3.5

www.codeplex.com/...ProjectReleases.aspx - Preview

ajax web development asp.net downloads free library

05 May 08

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.

www.krugle.org - Preview

web development codesnippets library reference search javascript css asp.net

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.

odetocode.com/162.aspx - Preview

asp.net web development tutorials codesnippets

28 Apr 08

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.

damieng.com/...e-vulnerable-to-html-injection - Preview

xss security asp.net tutorials codesnippets web development

... 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.

blog.wekeroad.com/...which-we-discuss-html-encoding - Preview

xss asp.net mvc web development security

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.

blog.codeville.net/...s-with-automatic-html-encoding - Preview

asp.net mvc security xss web development codesnippets downloads tutorials

27 Apr 08

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.

haacked.com/...ng-direct-access-to-views.aspx - Preview

asp.net mvc codesnippet security web development

25 Apr 08

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.

encosia.com/...nsume-aspnet-json-web-services - Preview

jquery asp.net codesnippets tutorials web development security

23 Apr 08

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.

msdn2.microsoft.com/...cc163347.aspx - Preview

ajax asp.net web development troubleshooting

1 - 20 of 59 Next › Last »
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo