Thursday, May 15, 2008

Frequently needed source Code for WebApplications

In this post I am going to enlist the sources for generalise asp.net web applications
1)Spellcheck for Web
Its a very easy way to integrate the spellchecker with less efforts
step I Download the required files
Extract and copy
webdir.wsf ,bin ,dic ,doc ,lib, src, web.config files and folders to root folder
step II Just include the js file spell.js
step III Call the function checkSpelling() on button click


2)Hidden control to get javascript variable value at server side

Thursday, May 8, 2008

Hands-On articles by MVPs

1)Articles by Bilal Haider on aspalliance
2)Some Practicals using Ajax
3)Matt Bersett's excellent Articles
4)Learn In asynchronus Way
....Some more yet to be added

Convering SQL resultset to XML file

Hello All,
Here's the simplest way to convert SQL result to XML output
-- declare an XML variable
DECLARE @x XML
SET @x = ''

-- create another XML variable
DECLARE @t XML
SELECT @t = ( SELECT TOP 3 name FROM sys.tables FOR XML AUTO)

-- insert the second XML variable to the first one
SET @x.modify( '
insert sql:variable("@t")
as last into (/Root)[1] ' )

-- Let us check the results
SELECT @x

/*





*/

Monday, May 5, 2008

Adding Attributes to Server Controls

Hi
If you dont find the required property of a partcular control like Linkbutton
Add the attributes to this control as follows
lnkButton.Attributes.Add("Target", "frame");
Basicaly when linkbutton is rendered at client side ,its in form of anchor control
so All server controls are have the attributes of corresponding html controls
in above case linkbutton have attributes of anchor control.
If you have additional comments on this .please post your most valuable comments
thanxs