Archives for the 'ASP.NET' Category

Integrating jQuery Autocomplete plugin with ASP.NET

I wanted to use the jQuery Autocomplete plugin:

$(document).ready(function() {
var url = “SomeData.aspx”;
$(”#myTextBox”).autocomplete(url, {
minChars: 2
});
[…]

26 January 2010 | jQuery, ASP.NET | No Comments

Bug in SgmlReader

Update 20 April 2010
SgmlReader 1.8.6 has this problem fixed.
Original post
Chris Lovett of Microsoft wrote SgmlReader 1.7 and has kindly shared it with the world. What does it do? In his own words:

An XmlReader implementation for loading SGML (including HTML) converting it to well formed XML, by adding missing quotes, empty attribute values, ignoring duplicate attributes, […]

26 August 2008 | .NET, C#, ASP.NET | 2 Comments

Visual Studio 2008 COM Exception Error

This morning I tried to open a Web Application Project using Visual Studio 2008 and got the following error:
System.Runtime.InteropServices.COM Exception
Sounds bad, doesn’t it? But actually the solution is very simple. Just ensure that the value for IISURL in the .csproj (or .vbproj) file is valid.
I would like to thank Martin Kulov for this tip.

27 May 2008 | ASP.NET | No Comments

ASP.NET Page Life Cycle

This is a favourite interview question: “what are the sequence of events in the ASP.NET page life cycle?”
Short answer:

Init
Load
PreRender
Unload

Long answer:

PreInit
Init
InitComplete
PreLoad
Load
LoadComplete
PreRender
SaveStateComplete
Unload
Disposed

Short answer with explanation, i.e., what to do when:

Init – read or initialize control properties
Load – set properties in controls and establish database connections
PreRender – make final changes to the contents of the page or its […]

23 May 2008 | Software engineering, ASP.NET | No Comments

ASP.NET ViewState Misconception

A very common misconception amongst ASP.NET page developers is that ViewState must be enabled to persist values across postbacks.
This is not true. Try this: on an .aspx page, add a textbox and a button. Your code should be similar to the one as follows:
PLAIN TEXT
HTML:

<body>

    <form id="form1" runat="server">

        <div>

      [...]

13 May 2008 | Software engineering, ASP.NET | No Comments