Lastest snippets

  • Referencing a service with ScriptManager so it can be called from client-side JavaScript

    It is very easy to reference a web service using the ScriptManager, once done you don't have to worry about how the data is piped through an exchange format (typically JSON) that is all done for you by the ScriptManager.
    Sat, Apr 19 2008 8:27 AM by Granville Barnett
  • Tweaking ScriptManager for release mode

    When you release an application and you are using ASP.NET AJAX you want to make the JS files as small as possible, you can do this in ASP.NET by simply defining the ScriptMode property of the ScriptManager.
    Sat, Apr 19 2008 8:24 AM by Granville Barnett
  • Atomic data selection using LinqDataSource

    Most times you will want to select only a select amount of data to retrieve from a database, in this case you need to know how to do this using the LinqDataSource. The following selects only the ContactName, CompanyName, and City from the Customers table.
    Sat, Apr 19 2008 8:22 AM by Granville Barnett
  • First query using the LinqDataSource

    This snippet shows you how to retrieve all the data from a specific table which is analogous to a select * from customers query.
    Sat, Apr 19 2008 8:13 AM by Granville Barnett
  • Specifying the type of authentication to use in an ASP.NET web project

    It is common in web applications to require some means of authenticating users. ASP.NET provides three main authentication providers: Forms, Windows, and Passport. If you choose Forms then you will be able to use a standard HTML form to verify the user credentials, Windows authentication uses Windo...
    Mon, Apr 14 2008 9:43 AM by Granville Barnett
  • Enabling debugging in ASP.NET projects

    By default debugging symbols are not intserted into ASP.NET pages, the primary reason being that of performance, if however you wish to debug your ASP.NET application you must enable debugging in the web.config file.
    Mon, Apr 14 2008 9:33 AM by Granville Barnett
  • How to add a JavaScript Confirm function when deleting a row from a datagrid?

    This small snippet shows how you can add a confirm function when deleting a row in the DataGrid server control.
    Sat, Mar 29 2008 11:32 PM by Sonu Kapoor
  • How to use the OnClientClient property?

    In the 1.1 .net framework we had to add client click code from the codebehind using the attributes.add method. However in 2.0 we have a new OnClientClick property that we can use to add client side code. You can use the same code inside a GridView as well!
    Sat, Mar 29 2008 11:29 PM by Sonu Kapoor