Tuesday, July 24, 2007

atlas:CollapsiblePanelExtender which fetch the data from the server when expands.

Hi,
I have changed the code of the existing atlas:CollapsiblePanelExtender , CollapsiblePanelBehavior.js and added some extra properties in atlasToolkit:CollapsiblePanelProperties which helps to make to the server call (fetch the fresh data from the server) when it expands. Moreover it can work in the same as it was working earlier.

There is a boolean property with the name IsEveryTimePostBack which will decide the behaviour of the postback.

<atlasToolkit:CollapsiblePanelExtender ID="cpe" runat="Server">
<atlasToolkit:CollapsiblePanelProperties
TargetControlID="ContentPanel"
ExpandControlID="HeaderPanel"
CollapseControlID="HeaderPanel"
Collapsed="True"
ExpandDirection="Vertical"
ImageControlID="ToggleImage"
ExpandedImage="~/images/collapse.jpg"
ExpandedText="Collapse"
CollapsedImage="~/images/expand.jpg"
CollapsedText="Expand"
SuppressPostBack="true"
IsEveryTimePostBack="true"
PostBackURL="http://SomeServer/SampleWebSite/TestService.asmx"
PostBackMethodName="Test"
PostBackMethodParameters="query:This is the result from"
ResultDiv="Result"/>
</atlasToolkit:CollapsiblePanelExtender>

Additional Creadted Property Used For

IsEveryTimePostBack ~~~~! Used for mentioned everytime postback should happen or not in case of expand.

PostBackURL ~~~~~~~~~! Used for mentioned the url of the web service.

PostBackMethodName~~~! Used for mentioned the method name of the
web service.
PostBackMethodParameters ~~~~! Used for mentioned the parameters of the method in the web service.

ResultDiv ~~~~~~~~~~~~~~~~~! Used to set the name of the div for the fresh result fetched from the web service.

Thanks.

Monday, July 16, 2007

SQL2008 Multiple Insert statement

One of the Difference between the SQL 2005 AND SQL 2008.

SQL2008 gives you the facility to insert multiple rows in a single statements.

--SQL Server 2005
INSERT dbo.EMPLOYEE(SALARY) VALUES (1000)
INSERT dbo.EMPLOYEE(SALARY) VALUES (2000)
INSERT dbo.EMPLOYEE(SALARY) VALUES (3000)
INSERT dbo.EMPLOYEE(SALARY) VALUES (4000)

--SQL Server 2008
INSERT dbo. EMPLOYEE(SALARY) VALUES (1000),(2000),(3000),(4000)

Thanks