People become really quite remarkable when they start thinking that they can do things.
When they believe in themselves, they have the first secret of success.
Thursday, July 30, 2009
Tuesday, July 28, 2009
Saturday, February 21, 2009
AJAX -- AutoCompleteExtender
Now a days, when you search something on web, Once you type some thing in to search Textbox, The box come up with suggestion starting with that letter.
Here is the pretty good example:

When I typed the "abc" google started to give me suggestions. Its Looks good :-)
The same thing you can achieve in you web application using "AutoCompleteExtender" control.
Let me show you some example:
I wanted to display three more letter as a postfix whatever i am typing...
eg.. prashaXBZ // here laxt there XBZ is my suggestion
For that I will create one web method & it will give me random character.
//web method code

-----------------------------------------------------------------------------
Here is the my .aspx page code

-------------
Here is the pretty good example:

When I typed the "abc" google started to give me suggestions. Its Looks good :-)
The same thing you can achieve in you web application using "AutoCompleteExtender" control.
Let me show you some example:
I wanted to display three more letter as a postfix whatever i am typing...
eg.. prashaXBZ // here laxt there XBZ is my suggestion
For that I will create one web method & it will give me random character.
//web method code

-----------------------------------------------------------------------------
Here is the my .aspx page code

HERE
MinimumPrefixLength="3" --> it will give you suggestion after three character.
CompletionSetCount="10" --> Number of suggestion you want to see
ServicePath="AutoComplete.asmx" --> My Service virtual path
ServiceMethod="GetCompletionList" --> My service method.
There we go...
ASP.NET Ajax ToolKit
Last week I got little time to explore new stuff in AJAX took kit.
Here is the step how to get AJAX toolkit controls in your web site.
1) Create Sample websit (in 3.5)
2) Get the "AjaxControlToolkit.dll" from the following links
http://www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx?
ReleaseId=16488
3) Right click on "Toolbox" of your website and select "Add Tab" & give the tab name
"Ajax Controls Toolkit".
4) Right click and select "Choose Item..." and browse the above .dll
5) There we go... you will get all the Microsoft Ajax Extention controls under
the "Ajax Controls Toolkit" tab.
Here is the step how to get AJAX toolkit controls in your web site.
1) Create Sample websit (in 3.5)
2) Get the "AjaxControlToolkit.dll" from the following links
http://www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx?
ReleaseId=16488
3) Right click on "Toolbox" of your website and select "Add Tab" & give the tab name
"Ajax Controls Toolkit".
4) Right click and select "Choose Item..." and browse the above .dll
5) There we go... you will get all the Microsoft Ajax Extention controls under
the "Ajax Controls Toolkit" tab.
Sunday, November 2, 2008
This row already belongs to another table , C# exception
//Here the scenario
DataSet dsSoruce = new DataSet();
DataSet ds1 = new DataSet();
DataTable dt1 = new DataTable("SelectedData");
DataRow[] dr1 = null;
string strExpr = string.Empty;
strExpr = "Name Like 'H%' "
// here we are doing copy into local dataset
ds1 = dsSoruce.Copy();
//copy talbe into local table
dt1 = ds1.Tables[0];
// get selected rows
dr1 = dt1.Select(strExpr);
if ((dr1 != null) && (dr1.Length > 0))
{
//clear the main dataset table
dsSoruce.Tables[0].Clear();
//import the row into main dataset
foreach (DataRow dr in dr1)
{
dsSoruce.ImportRow(dr);
}
}
DataSet dsSoruce = new DataSet();
DataSet ds1 = new DataSet();
DataTable dt1 = new DataTable("SelectedData");
DataRow[] dr1 = null;
string strExpr = string.Empty;
strExpr = "Name Like 'H%' "
// here we are doing copy into local dataset
ds1 = dsSoruce.Copy();
//copy talbe into local table
dt1 = ds1.Tables[0];
// get selected rows
dr1 = dt1.Select(strExpr);
if ((dr1 != null) && (dr1.Length > 0))
{
//clear the main dataset table
dsSoruce.Tables[0].Clear();
//import the row into main dataset
foreach (DataRow dr in dr1)
{
dsSoruce.ImportRow(dr);
}
}
System.Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater
Solution:
go to :-
C:\Oracle\product\10.1.0\Client_2 folder
follow the below steps:
1) right click on this folder
2) go to properties
3) select "administrator"
4) remove 'Read & Executes' permission
5) again add 'Read & Executes' permission on this folder
there you go...
go to :-
C:\Oracle\product\10.1.0\Client_2 folder
follow the below steps:
1) right click on this folder
2) go to properties
3) select "administrator"
4) remove 'Read & Executes' permission
5) again add 'Read & Executes' permission on this folder
there you go...
.Net- ordered Hashtable
.Net 2.0 introduce "OrderedDictionary" in order to store sorted (key,object) pair value.
Here is the sample code in [C#]
using System.Collections.Specialized;
OrderedDictionary objOrderedDictionary = new OrderedDictionary();
objOrderedDictionary.Add("1", "first value");
objOrderedDictionary.Add("5", "second value");
objOrderedDictionary.Add("8", "third value");
objOrderedDictionary.Add("12", "fourth value");
//set enumerator
IDictionaryEnumerator enumerator;
enumerator = odServiceAmount.GetEnumerator();
while (enumerator.MoveNext())
{
string sKey = enumerator.Key.ToString().Trim();
string sValue = enumerator.Value.ToString().Trim();
}
Here is the sample code in [C#]
using System.Collections.Specialized;
OrderedDictionary objOrderedDictionary = new OrderedDictionary();
objOrderedDictionary.Add("1", "first value");
objOrderedDictionary.Add("5", "second value");
objOrderedDictionary.Add("8", "third value");
objOrderedDictionary.Add("12", "fourth value");
//set enumerator
IDictionaryEnumerator enumerator;
enumerator = odServiceAmount.GetEnumerator();
while (enumerator.MoveNext())
{
string sKey = enumerator.Key.ToString().Trim();
string sValue = enumerator.Value.ToString().Trim();
}
Subscribe to:
Posts (Atom)