HOME

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 ;