Skip to main content

Posts

Showing posts from 2011

Captcha code Work Out

1.In Web.config file in handlers section 2.Add Captcha DLL to AddReferences 3.Aspx <%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc1" %> cc1:CaptchaControl ID="CaptchaControl1" runat="server" asp:Label ID="lbltext" Text="enter the above code here:" runat="server asp:TextBox ID="txtCaptch" runat="server" asp:Label ID="lblmessage" runat="server" 4.in button click write(Aspx.cs) if (!CaptchaControl1.UserValidated) { lblmessage.Text = "You Enterted Text Doesn't Match"; return; } else { lblmessage.Text = "Secuessfully entered"; CaptchaControl1.Visible = false; txtCaptch.Visible = false; lbltext.Visible = false; lblmessage.Visible = false; }

Recaptcha work done by me

1.In Web.config file in handlers section 2.Add Captcha DLL to AddReferences 3.Aspx <%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc1" %> 4.in button click write if (!CaptchaControl1.UserValidated) { lblmessage.Text = "You Enterted Text Doesn't Match"; return; } else { lblmessage.Text = "Secuessfully entered"; CaptchaControl1.Visible = false; txtCaptch.Visible = false; lbltext.Visible = false; lblmessage.Visible = false; }

ASP.Net GridView Edit Update Dropdownlist Values using C#

Edit or Update command of GridView control provides the functionality to change the GridView mode from read only view to edit mode and then update the new selected value of DropdownList into the SQL Database table. You can use the C# FindControl method to get the reference of nested Dropdownlist control that enables you to get the new selectedvalue and save it into the database table. Command Events Used 1. OnRowEditing 2. OnRowCancelingEdit 3. OnRowUpdating GridView Property Used 1. DataKeys C# Method Used 1. FindControl http://programming.top54u.com/post/Edit-Update-GridView-DropDownList-SelectedValue.aspx

ASP.Net GridView CommandField Delete Command

ASP.Net GridView control provides a CommandField that enables you to display the Delete Command button. You can easily attach the GridView event such as RowDeleting to implement the delete command of GridView control. Command Event Used 1. OnRowDeleting GridView Property Used 1. DataKeys

ASP.Net GridView Checkbox Column Select All using C#

You can apply the C# foreach loop to loop over each row item of GridView control and use the C# FindControl method to get the checkbox control placed inside the GridView control. Set the Checked property of each checkbox retrieved using FindControl method from each row of GridView equal to true that will select all the checkboxes placed inside the GridView control. C# Methods Used 1. C# foreach loop 2. FindControl method http://programming.top54u.com/post/ASP-Net-GridView-Checkbox-Select-All-using-C-sharp.aspx

What is the difference between Array and Array List ? Explain in brief with example.

Array contain a similar data type and array size is fixed i.e dynamically its size can't be changed. but arraylist can store more then one data type and its size can be changed dynamically. one major difference is that,array used to store primitive data type(i.e. int,char etc) while arraylist is used to store objects. rajesh saxena Mar 25, 2011 Array is fixed length,array-list is growing array(means they have no fixed length , if u add more the size arraylist size incress and vise versa) seond one: if add and remove the elements in the middle takes more time by using arrylist in that time use linkedlist arrylist is good for retiveing the elements in specific position arraylist is faster than linkedlist for random accesing of elemnets

What is a Database?

The database is a collection of data and this data is stored in form of tables at logical level, and in the data files at the physical level. There are some other files as well like Redo log files, Control files, Initialization files which stores important information about the database.

What is the difference between UNION and UNION ALL?

UNION The UNION command is used to select related information from two tables, much like the JOIN command. However, when using the UNION command all selected columns need to be of the same data type. With UNION, only distinct values are selected. UNION ALL The UNION ALL command is equal to the UNION command, except that UNION ALL selects all values. The difference between Union and Union all is that Union all will not eliminate duplicate rows, instead it just pulls all rows from all tables fitting your query specifics and combines them into a table

Can you get second highest salary from the table?

Query:- SELECT Emp_Name,Emp_Salary FROM Employee e1 WHERE 2 = (SELECT COUNT(DISTINCT (e2.Emp_Salary))FROM Employee e2 WHERE e2.Emp_Salary >= e1.Emp_Salary) The above employee table contains two same records as second highest salary so the result set will look like below output table. Output:- Emp_Name Emp_Salary Sham 15000

The article will give you the very basic thing for sending SMS from your computer to any phone over GSM modem.

Using the Code Collapse #region Private Declaration for the main thread private Thread m_MailThread = null; #endregion #region Constructor /// /// Constructor for InitializeComponent /// public MySmsService()//Change MySmsService to your Service Class Name { InitializeComponent(); } #endregion #region OnStart Event of the service protected override void OnStart(string[] args) { EvtlgSmsService.WriteEntry("MySmsService started!!"); if (m_MailThread == null) m_MailThread = new Thread(new ThreadStart(SMSThread)); m_MailThread.Start(); } #endregion #region OnStop Event of the service protected override void OnStop() { EvtlgSmsService.WriteEntry("MySmsService stopped !!."); if (serialPort1.IsOpen) serialPort1.Close(); m_MailThread.Abort(); } #endregion #region Sms Main thread /// /// Sms main thread /// private void SMSThread() { do { Thread.Sleep(30000); SendSMS(); } while (1 == 1); } #endregion #regio

send sms

using System; using System.Threading; using System.ComponentModel; using System.IO.Ports; public class SMSCOMMS { private SerialPort SMSPort; private Thread SMSThread; private Thread ReadThread; public static bool _Continue = false; public static bool _ContSMS = false; private bool _Wait = false; public static bool _ReadPort = false; public delegate void SendingEventHandler(bool Done); public event SendingEventHandler Sending; public delegate void DataReceivedEventHandler(string Message); public event DataReceivedEventHandler DataReceived; public SMSCOMMS(ref string COMMPORT) { SMSPort = new SerialPort(); SMSPort.PortName = COMMPORT; SMSPort.BaudRate = 9600; SMSPort.Parity = Parity.None; SMSPort.DataBits = 8; SMSPort.StopBits = StopBits.One; SMSPort.Handshake = Handshake.RequestToSend; SMSPort.DtrEnable = true; SMSPort.RtsEnable = true; SMSPort.NewLin

WCF

What is the Messaging Pattern? Which Messaging Pattern WCF supports? Posted by: Prasham | Show/Hide Answer Messaging Pattern : Messaging patterns describes how client and server should exchange the message. There is a protocol between client and server for sending and receiving the message. These are also called Message Exchange Pattern. WCF supports following 3 types of Message Exchange Patterns 1. request - reply (default message exchange pattern) 2. OneWay (Simplex / datagram) 3. Duplex(CallBack) Thanks Prasham Which is the default Message Exchange Pattern (MEP) ? Posted by: Prasham | Show/Hide Answer NOTE: This is objective type question, Please click question title for correct answer. in WCF, Which contract is used to document the errors occurred in the service to client? Posted by: Peermohamedmydeen | Show/Hide Answer Fault Contract is used to document the errors occurred in the service to client. Difference between Web Services and WCF Posted by: Jmaneesh | Show/Hide Answer Majo

What is three major points in WCF?

What is three major points in WCF? 1) Address --- Specifies the location of the service which will be like http://Myserver/MyService.Clients will use this location to communicate with our service. 2) Contract --- Specifies the interface between client and the server. It’s a simple interface with some attribute. 3) Binding --- Specifies how the two paries will communicate in term of transport and encoding and protocols What is WCF? The Windows Presentation Foundation (WPF) is a next generation graphics platform that is part of .NET 3.0 and .NET 3.5. It allows you to build advanced user interfaces that incorporate documents, media, 2D and 3D graphics, animations, and web-like characteristics. In just 24 sessions of one hour or less, you will be able to begin effectively using WPF to solve real-world problems, developing rich user interfaces in less time than you thought possible. Using a straightforward, step-by-step approach, each lesson builds on a real-world foundation forged