If we want to set position of cursor to any character index in textbox by using following property:TextBox1.SelectionStart= 2; //this will set cursor after 2nd character in textb...
Thursday, November 26, 2009
Make textbox numeric only with negative value accept
Lets we want to create a textbox which should take only numeric (double/decimal) value and the value can also be in negativeSolution:Private Sub txt_KeyPressWithNegative(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtothercharges.KeyPress, txtfreight.KeyPress Dim decexist As Boolean = False If (CType(sender, TextBox).Text.IndexOf(".") > 0) And e.KeyChar.Equals("."c)...
Wednesday, November 25, 2009
Difference between <%# Bind(””) %> and <%# Eval(””) %>
EVal is one way binding, Bind is two wayIf you bind a value using Eval, it is like a read only. You can only view the data.If you bind a value using Bind, and if you do some change on the value it will reflect on the database alsoso when ever you just want to show metter on grid that time you should use Eval and if you want that user should be able to change the content and that should be reflect in database then we should use...
Monday, November 23, 2009
Difference between website project and webapplication project in VS2008
n the web**site** project, you typically work off a directory on your disk. There is no "project" file that defines the project's structure. Anything that's in that directory and any of its subdirectories automatically becomes part of your site - which can be a good or a bad thing.A website project usually doesn't live inside a namespace, e.g. any code in your App_Code subdirectory will typically not have a namespace associated...
Why constructor not returns value
What actually happens with the constructor is that the runtime uses type data generated by the compiler to determine how much space is needed to store an object instance in memory, be it on the stack or on the heap. This space includes all members variables and the vtbl. After this space is allocated, the constructor is called as an internal part of the instantiation and initialization process to initialize the contents of the...
Multiple Combobox with same datasource
One day Mr. Jodha asked me for solution for his prolem.Problem: -he used select query and got all data in datatable.-then he made that datatable as datasource for two combobox which will show differentfields of that table-but the proble is that when he select value from one combobox then the value of same record in secondcombobox get selected.and that is main problem.Solution:Their exist very simple solution for this kind of...
Tuesday, November 17, 2009
Difference between JScript, JScript.NET and Managed JScrip
Difference between JScript, JScript.NET and Managed JScriptThere are three different types of JScript engines that MS currently offers to the users. In this blog I would like to discuss more about the differences between them and would go into the reasoning for three different types sometime later. JScript (or native JScript)Read the intro about this in my previous blog here. The native JScript engine relies primarily on Microsoft's...
Labels:
java script,
JScript,
JScript.NET
VB.NET/C#.NET Communication with JavaScript
This article will help you to learn how to do communication between javascript and (vb.net/c#.net)To start off, we'll start with a very simple example; all this will do is call a JavaScript function from VB.NET to display an alert with message 'Hello world'. Similarly, from the HTML page using JavaScript, we'll call a VB.NET function which will again display a messagebox with the message 'Hello world'. These are the steps you...
Labels:
ASP.NET,
java script
Learn Object Oriented JavaScript
Learn Basic JavaScript If you are beginner.This Article is for Learning Advanced JavaScript and how to use it in Asp.netASP.NET and Visual Studio 7.0 are making important contributions to the improvement of the web development experience. Unfortunately, there is also a tendency created among developers to limit their interaction with JavaScript. Clearly JavaScript is valuable for adding client-side functionality to web pages....
Labels:
java script
Basic JavaScripts
As we all know in web application development the javascript is very important so lets learn some basic javaScript. < html >< head >< title >This is a JavaScript example< /title >< script language="JavaScript" >< !--document.write("Hello World!");//-- >< /script >< /head >< body > Hi, man! < /body >< /html >Usually, JavaScript code starts with the tag < script...
Labels:
java script
Monday, November 16, 2009
How to detect browser close button is clicked ?
call this function from page_unload() so when user will close the browser either by [X] button or by alt+f4 or from exit (from file menu). by using this function you can detect that browser is going to close and you can perform any of your choice operation just before browser get close.function CheckBrowser(){ // Check Browser Close [X] , Alt+F4 , File -> Close if(window.event.clientX < 0 && window.event.clientY...
Wednesday, November 4, 2009
What is use of "SET XACT_ABORT" in SQL
When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back.When SET XACT_ABORT is OFF, in some cases only the Transact-SQL statement that raised the error is rolled back and the transaction continues processing. Depending upon the severity of the error, the entire transaction may be rolled back even when SET XACT_ABORT is OFF. OFF is the default setting.Compile...
Labels:
SQL,
SQL Interview Questions
Monday, November 2, 2009
Primary Key , Foreign Key Column Name for Key Constraint

Query written below will give you result as shown in image.SELECT [constraint_name] = f.[name], [child_table] = OBJECT_NAME(f.parent_object_id), [child_column] = cc.name, [parent_table] = OBJECT_NAME(f.referenced_object_id), [parent_column] = pc.nameFROM sys.foreign_keys fINNER JOIN( SELECT c.[object_id],...
Labels:
SQL
Subscribe to:
Posts (Atom)