HOME

Thursday, December 29, 2011

Alphanumeric sorting in sql server 2005

elect SectionNumber from tableName order by Left(replicate('0',20) + SectionNumber, 20)

stop running this script error asp.net a script on this page is causing ie to run slowly if it continues to run

There are situations when a Web page contains script that takes an unusually long time to run.
There will be a warning message after a certain number of statements has been processed.

The solution is to increase the default number of statements,before the warning is given


1.Go to Start/Run/type :regedit

Open this key: HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\Styles

(If the Styles key is not present, create a new key that is called Styles.)

2.Right click anywhere in the right pane and create a new DWORD value called "MaxScriptStatements"
(copy and paste that in to the name box) and set the value to the desired number of script statements.

Try 8,000,000 to start with.

Friday, December 2, 2011

CLOSE A WEB PAGE in C#

 Response.Write("<script language='javascript'> { window.close();}</script>");

Saturday, October 22, 2011

Could not load file or assembly ‘AjaxControlToolkit’ or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0×80070057 (E_INVALIDARG))

I’m running Vista and have no “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files” folder, but I did find “C:\Users\DellUser\AppData\Local\Temp\Temporary ASP.NET Files”. Clearing this folders contents corrected my build error

Thursday, October 20, 2011

Read Data from command promt(CMD) by running a command In C#

Process p = new Process();
// Redirect the output stream of the child process.
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "YOURBATCHFILE.bat";
p.Start();
// Do not wait for the child process to exit before
// reading to the end of its redirected stream.
// p.WaitForExit();
// Read the output stream first and then wait.
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();

Saturday, February 5, 2011

Solution : Print button is not displayed in reportviewer

Reportviewer is perfectly work in Internet Explorer 8.0
so Install IE 8.0

Solution For ReportViewer In local system Working ,But In (SERVER) Remotely Not Working

Solution to this problem
1.Download Microsoft Report viewer version 10.0
2.Install Microsoft Report viewer version 10.0 in server
3.change weconfig as
<system.webserver>
<modules runallmanagedmodulesforallrequests="true">
<validation validateintegratedmodeconfiguration="false">
<handlers>
<add type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" path="Reserved.ReportViewerWebControl.axd" verb="*" precondition="integratedMode" name="ReportViewerWebControlHandler">
</handlers>
</SYSTEM.WEBSERVER>
4.Its perfectly work only in IE8 so install IE8.
5.and change settings of IE8 as fallows
*. Tools -> InternetOptions -> Security Tab -> Custom Level button
*. Enable all ActiveX contrlos and plugins

ROW NUMBER in SQL SERVER 2005

SELECT EMPID, row_number() over (order by EMPID) Sno FROM EMPLOYEE

Thursday, February 3, 2011

MULTIPLE ROWS WITH SAME DATA EXCEPT ONE COLUMN , THEN WE CAN CONVERT INTO ONE ROW WITH COMMA SEPERATOR

select p.assignNum, p.description, p.startDate,
stuff((select ', ' + cast(employeeNum as varchar(512))from #TableChild c where c.ASSIGNNUM = p.ASSIGNNUM for xml path('')),1,2,'') as employeeList
from #TableParent p ;

Saturday, January 29, 2011

GRID WITH SCROLLING

< id="gpanel" scrollbars="Vertical" width="900px" runat="server">
< id="GridView1" runat="server">
< /asp:gridview>
< /asp:panel>