tag:blogger.com,1999:blog-86177503240938257802023-11-15T21:30:46.696+05:30QuadtechindiaQuadtechindia is your ultimate guide to free and open source code for Software developers.Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-8617750324093825780.post-3261684198842470962014-05-25T14:19:00.002+05:302014-05-25T14:19:20.953+05:30<div dir="ltr" style="text-align: left;" trbidi="on">
<br /></div>
Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-77946665783020322722012-02-02T16:50:00.000+05:302014-05-25T14:19:32.997+05:30Could not load file or assembly 'CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependenciesIt can be solved by installing the crystal run time package that can be found on your local computer (I believe it is installed with visual studio 2008). It is located in: <br />
<br />
\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5<br />
<br />
I found this information in the Local Help: ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/crystlmn/html/topic409.htm<br />
<br />
Running the MSI on the production server installed the version 10.5.3700.0 files there and cleared the error.Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-64283541583122042082012-01-04T12:08:00.003+05:302012-01-04T12:12:26.130+05:30Difference between Triggers and Stored Procedure1. SP may Return a value but Trigger Not,<br />
2. In SP you can pass parameter But in trigger you can't<br />
3. we explicitly call the Sp when Trigger are implicitly <br />
fired<br />
4. you can write a sp in Trigger but in a Trigger you cant <br />
write SP.<br />
5. Trigger written on an individual Table or View where SP <br />
is written for an DatabaseQuadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-87953918592965487222011-12-25T17:42:00.001+05:302012-01-04T12:12:48.564+05:30USB Flash drive automatic back upAutomatically backup USB flash drives with help of an application available on www . usbflashcopy . com , a free utility..Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-21226943308861541552011-12-25T16:07:00.001+05:302012-01-04T12:12:59.730+05:30THINGS Your WEBCAM Can Do<b>1. HOME SECURITY SYSTEM : -</b><br />
Free Softwares are available over internet for download, which you can use to turn a webcam into a remote security system.<br />
Check out www.yawcam. com (For Windows)or www. vitamindinc.com (Windows and MAC).<br />
<br />
<b>2. Gaming : -</b><br />
Try www.newgrounds. com, which have plenty of games which uses web cam as an input like keyboard and mouse. Check it out!!<br />
<br />
<b>3. Unlock your laptop / desktop using face recognition</b><br />
Visit http://bananascreen.en.softonic.com and download the free software.<br />
<br />
<b>4. Funny Effects on Photo</b><br />
Check out www.cameroid.com or www.seenly.com and have fun.<br />
<br />
<b>5. BAR CODE READER </b><br />
Shocked but its true. Download the software from www.bcwebcam. <br />
<br />
<b>6. MAKE A FONT OF YOUR HANDWRITING</b><br />
Head over to www.pilothandwriting.com and create one and show your friends your handwriting is one of fonts which systems supportsQuadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-61101116051249956082010-09-01T13:37:00.000+05:302010-09-01T13:37:45.245+05:30Difference between website and web application : ASP.NETA "web site" has its code in a special App_Code directory and it's compiled into several DLLs at runtime. A "web application" is precompiled into one single DLL that is built and copied in the Bin directory. <br />
<br />
A web site is just a group of all files in a folder and sub folders. There is no project file. All files under the specific folder - including your word documents, text files, images etc are part of the web site.<br />
<br />
You have to deploy all files including source files (unless you pre compile them) to the server. Files are compiled dynamically during run time.<br />
<br />
In website since there is no project file, there is nothing that you can double click to open the web site in Visual Studio for editing. You have to open Visual Studio first and then open the site from Visual StudioQuadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-47178997888911055792010-08-30T16:17:00.003+05:302014-05-25T14:20:25.428+05:30Terminate a process in task managerpublic void terminate()<br />
{<br />
Process[] plist = Process.GetProcesses();<br />
foreach (Process p in plist)<br />
{<br />
try<br />
{<br />
if (p.MainModule.ModuleName.ToUpper() == "WEBDEV.WEBSERVER.EXE")<br />
{<br />
//p.Kill();<br />
}<br />
<br />
if (p.MainModule.ModuleName.ToUpper() == "IEXPLORE.EXE")<br />
{<br />
p.Kill();<br />
}<br />
}<br />
catch<br />
{<br />
}<br />
<br />
}<br />
}Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-82127542929398352282010-06-10T11:14:00.000+05:302010-06-10T11:14:58.385+05:30Code to export data to excel in asp.net using c#if (GridView1.Rows.Count > 0)<br />
{<br />
<br />
Response.ContentType = "application/vnd.ms-excel";<br />
Response.Charset = "";<br />
this.EnableViewState = false;<br />
<br />
Response.Write("<h4>");<br />
Response.Write("<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'><tr><td><table width='100%' border='0' cellpadding='0' cellspacing='0' ><tr><td width='100%' >logo image</td></tr>
<tr><td></td><td></td><td></td><td></td><td >Title</td></tr>
</table></td></table>");<br />
Response.Write("</h4>");<br />
Response.Write("<br />
");<br />
<br />
<br />
gvRes.HeaderStyle.Font.Bold = true;<br />
gvRes.HeaderStyle.BackColor = System.Drawing.Color.Black;<br />
<br />
<br />
System.IO.StringWriter tw = new System.IO.StringWriter();<br />
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);<br />
HtmlForm frm = new HtmlForm();<br />
this.Controls.Add(frm);<br />
<br />
frm.Controls.Add(gvRes);<br />
frm.RenderControl(hw);<br />
Response.Write(tw.ToString());<br />
Response.End();<br />
<br />
}Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-24014088982503291272010-05-25T18:06:00.001+05:302010-06-10T11:04:33.404+05:30How to Enable saving of changes in SQL server 2008you can get the details by clicking on ? on the dialog box that shows this error<br />
<br />
or the flow is<br />
<br />
Open the following<br />
Tools > Options > Designers > Table and Database Designers > Prevent saving changes that require table re-creation. Just Turn this option off and you will be able to save the tables again.<br />
<br />
and now you can save changes to all tables of any database.Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-8947997855901567152010-04-07T15:10:00.001+05:302010-06-10T11:09:18.133+05:30Function to Encrypt-Decrypt Connection String in Web.Config FileCode to Encrypt Connection String in Web.Config File<br />
<br />
using System.Configuration;<br />
using System.Web.Configuration;<br />
using System.Web.Security;<br />
<br />
<br />
public void EncryptConnectionString()<br />
{<br />
<br />
Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);<br />
ConfigurationSection section = config.GetSection("connectionStrings");<br />
if (!section.SectionInformation.IsProtected)<br />
{<br />
section.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");<br />
config.Save();<br />
}<br />
}<br />
<br />
<br />
public void DecryptConnectionString()<br />
{<br />
Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);<br />
ConfigurationSection section = config.GetSection("connectionStrings");<br />
if (section.SectionInformation.IsProtected)<br />
{<br />
section.SectionInformation.UnprotectSection();<br />
config.Save();<br />
}Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-8909939297317348752010-02-19T05:12:00.001+05:302010-06-10T11:10:06.325+05:30A potentially dangerous Request.Form value was detected from the client sideIf you face such above mentioned error on inserting a value then that value might be containing anchor tags(< or >). If you want to insert these values you have to write<br />
<br />
ValidateRequest="false" in page directive (first line of .aspx file)<br />
<br />
<br />
Example:<br />
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="xyx.aspx.cs" Inherits="xyz" ValidateRequest="false" %>Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-3894307564405255142010-02-01T23:31:00.001+05:302010-06-10T11:11:29.926+05:30Code to identify sql server version and editionWrite following statement in Query Window<br />
<br />
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')<br />
<br />
<br />
<br />
* The product version (10.0.1600.24)<br />
* The product level (RTM)<br />
* The edition (Enterprise)<br />
<br />
Inorder to find out version of sql server write the following statements in query window<br />
<br />
SELECT @@VERSIONQuadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-53654458771894546872010-01-20T02:25:00.004+05:302010-06-10T11:11:47.464+05:30Code to export data to excel via asp.netif (GridView1.Rows.Count > 0)<br />
{<br />
<br />
Response.ContentType = "application/vnd.ms-excel";<br />
Response.Charset = "";<br />
this.EnableViewState = false;<br />
<br />
Response.Write("Add anything (tag or text) as per requirement");<br />
<br />
GridView1.HeaderStyle.Font.Bold = true;<br />
GridView1.HeaderStyle.BackColor = System.Drawing.Color.Black;<br />
<br />
<br />
System.IO.StringWriter tw = new System.IO.StringWriter();<br />
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);<br />
HtmlForm frm = new HtmlForm();<br />
this.Controls.Add(frm);<br />
<br />
frm.Controls.Add(GridView1);<br />
frm.RenderControl(hw);<br />
Response.Write(tw.ToString());<br />
Response.End();<br />
<br />
}Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-33464639002084111202010-01-19T02:17:00.001+05:302010-06-10T11:15:31.550+05:30What is Literal ?A Literal Web Server control doesn't have any visual appearance on a Web Form but is used to insert literal text into a Web Form. This control makes it possible to add HTML code directly in the code designer window without switching to design view and clicking the HTML button to edit the HTML. <br />
The notable property of this control is the text property which is the text that is inserted into the Web Form.<br />
<br />
Example<br />
<br />
The following line of code demonstrates that. <br />
<br />
Literal1.Text = "<b><u>Literal Demo</b></u>"Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-76983964922060467712009-11-04T14:10:00.003+05:302010-06-10T11:15:50.519+05:30Sql data adapter in C#using System.Data;<br />
using System.Data.SqlClient;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsFormsApplication9<br />
{<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
FillData();<br />
}<br />
<br />
void FillData()<br />
{<br />
// 1<br />
// Open connection<br />
using (SqlConnection c = new SqlConnection(<br />
Properties.Settings.Default.DataConnectionString))<br />
{<br />
c.Open();<br />
// 2<br />
// Create new DataAdapter<br />
using (SqlDataAdapter a = new SqlDataAdapter("SELECT * FROM EmployeeIDs", c))<br />
{<br />
// 3<br />
// Use DataAdapter to fill DataTable<br />
DataTable t = new DataTable();<br />
a.Fill(t);<br />
<br />
// 4<br />
// Render data onto the screen<br />
dataGridView1.DataSource = t; // <-- From your designer<br />
}<br />
}<br />
}<br />
}<br />
}<br />
<br />
<br />
Part 1. This creates a new SqlConnection instance. Note that you must include the System.Data.SqlClient namespace in your program. [See top of code]<br />
<br />
Part 2. After calling Open() on the SqlConnection, we use another using block for the SqlDataAdapters. The using statements are ideal for disposing of resources, making your programs more efficient and reliable. [C# SqlClient Tutorial - dotnetperls.com]<br />
<br />
Part 3. Here we instantiate and Fill a new DataTable. Note that the Fill method on DataTable will populate the internal rows and columns of the DataTable to match the SQL result.<br />
<br />
Part 4. This part is commented out because it won't compile unless you have a DataGridView. We see the DataSource being assigned to the DataTable. The result will be a filled DataGridView with data from SQL Server.Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-20787339890087766322009-11-04T14:00:00.004+05:302010-06-10T11:16:07.885+05:30Culture and UI Culture for ASP.NET Web Page GlobalizationIn an ASP.NET Web page, you can set to two culture values, the Culture and UICulture properties. The Culture value determines the results of culture-dependent functions, such as the date, number, and currency formatting, and so on. The UICulture value determines which resources are loaded for the page.<br />
The two culture settings do not have to have the same value. Depending on your application, it might be important to set them separately. An example is a Web auction site. The UICulture property might change for each Web browser, whereas the Culture stays constant. Therefore, prices are always displayed in the same currency and formatting.<br />
<br />
<br />
<%@ Page Language="C#" uiculture="auto" %><br />
<%@ Import Namespace="System.Threading" %><br />
<%@ Import Namespace="System.Globalization" %><br />
script runat="server"<br />
protected override void InitializeCulture()<br />
{<br />
if (Request.Form["ListBox1"] != null)<br />
{<br />
String selectedLanguage = Request.Form["ListBox1"];<br />
UICulture = selectedLanguage ;<br />
Culture = selectedLanguage ;<br />
<br />
Thread.CurrentThread.CurrentCulture =<br />
CultureInfo.CreateSpecificCulture(selectedLanguage);<br />
Thread.CurrentThread.CurrentUICulture = new<br />
CultureInfo(selectedLanguage);<br />
}<br />
base.InitializeCulture();<br />
}<br />
/script<br />
html<br />
body<br />
form id="form1" runat="server"<br />
div<br />
asp:ListBox ID="ListBox1" runat="server"<br />
asp:ListItem Value="en-US"<br />
Selected="True"English /asp:ListItem<br />
asp:ListItem Value="es-MX">EspaƱol /asp:ListItem<br />
asp:ListItem Value="de-DE">Deutsch /asp:ListItem<br />
/asp:ListBox <br />
br /<br />
asp:Button ID="Button1" runat="server"<br />
Text="Set Language"<br />
meta:resourcekey="Button1" /<br />
br /<br />
asp:Label ID="Label1" runat="server"<br />
Text=""<br />
meta:resourcekey="Label1" /<br />
/div<br />
/form<br />
/body<br />
/html<br />
<br />
tags cannot be posted so please add angels bracketsQuadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com0tag:blogger.com,1999:blog-8617750324093825780.post-74088783814747988492009-10-08T09:54:00.001+05:302010-06-10T11:16:24.918+05:30Example to Insert and Update Trigger in Sql-ServerInsert Trigger<br />
CREATE TRIGGER trig_addAuthor ON [dbo].[Emp] <br />
FOR INSERT<br />
AS<br />
DECLARE @newName VARCHAR(100) <br />
SELECT @newName = (SELECT ename FROM Inserted)<br />
-- Print the name of the new author <br />
PRINT 'New author "' + @newName + '" added.'<br />
<br />
Update Trigger<br />
CREATE TRIGGER trig_updateemp<br />
ON emp<br />
FOR UPDATE <br />
AS<br />
DECLARE @oldName VARCHAR(100) <br />
DECLARE @newName VARCHAR(100)<br />
IF NOT UPDATE(ename) <br />
BEGIN <br />
RETURN <br />
END<br />
SELECT @oldName = (SELECT ename FROM Deleted) <br />
SELECT @newName = (SELECT ename FROM Inserted)<br />
PRINT 'Name changed from "' + @oldName + '" to "' + @newName + '"'Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com1tag:blogger.com,1999:blog-8617750324093825780.post-86410787795309437352009-09-24T09:00:00.002+05:302010-06-10T11:16:42.581+05:30Code to clear cache in asp.netResponse.Cache.SetNoStore();<br />
Response.Cache.SetCacheability(HttpCacheability.NoCache);<br />
<br />
write this code in page load <br />
add using System.Web;Quadtechindiahttp://www.blogger.com/profile/12119999442781656125noreply@blogger.com1