Click here to Skip to main content
15,922,007 members
Home / Discussions / C#
   

C#

 
QuestionParsing a html content or content in a web page Pin
Sandep H S24-Jul-08 22:32
Sandep H S24-Jul-08 22:32 
AnswerRe: Parsing a html content or content in a web page Pin
Scott Dorman25-Jul-08 4:12
professionalScott Dorman25-Jul-08 4:12 
AnswerRe: Parsing a html content or content in a web page Pin
Tuwing.Sabado25-Jul-08 4:31
Tuwing.Sabado25-Jul-08 4:31 
QuestionRemote Connection Pin
Chetan Patel24-Jul-08 22:29
Chetan Patel24-Jul-08 22:29 
QuestionCreate Setup Pin
Susanmat24-Jul-08 18:49
Susanmat24-Jul-08 18:49 
AnswerRe: Create Setup Pin
Vimalsoft(Pty) Ltd25-Jul-08 0:16
professionalVimalsoft(Pty) Ltd25-Jul-08 0:16 
QuestionWild Card Search Pin
neer124-Jul-08 18:45
neer124-Jul-08 18:45 
AnswerRe: Wild Card Search Pin
Zafar Sultan24-Jul-08 19:37
Zafar Sultan24-Jul-08 19:37 
Your problem shows there must be a table in your database which you want to target.If you are using that text box on ASP.Net page,
Try this one:

string searchkeyword=yourtextbox.text + "%"; (special character is for use with stored procedure)

stored procedure:
create procedure searchwithkeyword
(
@keyword nvarchar(50)
)
as
select names from yourtable where name like @keyword

now the code for button click event:

sqlconnection con=new sqlconnection(yourconnectionstring);
con.open();
sqlcommand com=new sqlcommand("searchwithkeyword",con);
com.commandtype=commandtype.storedprocedure;
com.parameters.addwithvalue("@keyword",searchkeyword);
sqldatareader dr=com.executereader();
if(dr.read());
{
//display results
}
else
{
//show message
}
dr.dispose();
com.dispose();
con.dispose();

The code is a bit messy as it is not implementing try catch and finally blocks but if it is worth helping do that yourself and let me know what happened to your problem. Smile | :)
AnswerRe: Wild Card Search Pin
neer124-Jul-08 20:38
neer124-Jul-08 20:38 
GeneralRe: Wild Card Search [modified] Pin
User 665824-Jul-08 22:42
User 665824-Jul-08 22:42 
GeneralRe: Wild Card Search Pin
neer124-Jul-08 22:55
neer124-Jul-08 22:55 
QuestionCapturing letter and displaying in uppercase Pin
neer124-Jul-08 18:42
neer124-Jul-08 18:42 
AnswerRe: Capturing letter and displaying in uppercase Pin
stancrm24-Jul-08 19:57
stancrm24-Jul-08 19:57 
QuestionUsing List? Pin
dipuks24-Jul-08 16:20
dipuks24-Jul-08 16:20 
AnswerRe: Using List? Pin
Scott Dorman24-Jul-08 16:25
professionalScott Dorman24-Jul-08 16:25 
GeneralRe: Using List? Pin
PIEBALDconsult24-Jul-08 16:51
mvePIEBALDconsult24-Jul-08 16:51 
GeneralRe: Using List? Pin
Scott Dorman24-Jul-08 16:55
professionalScott Dorman24-Jul-08 16:55 
AnswerRe: Using List? Pin
Scott Dorman24-Jul-08 16:57
professionalScott Dorman24-Jul-08 16:57 
AnswerRe: Using List? Pin
Guffa24-Jul-08 22:20
Guffa24-Jul-08 22:20 
AnswerRe: Using List? Pin
Tuwing.Sabado25-Jul-08 4:43
Tuwing.Sabado25-Jul-08 4:43 
Questionkill object Pin
nelsonpaixao24-Jul-08 14:13
nelsonpaixao24-Jul-08 14:13 
AnswerRe: kill object Pin
Christian Graus24-Jul-08 20:10
protectorChristian Graus24-Jul-08 20:10 
Questioncrystal reports easy opinion Pin
nelsonpaixao24-Jul-08 14:03
nelsonpaixao24-Jul-08 14:03 
AnswerRe: crystal reports easy opinion Pin
selcuks24-Jul-08 22:35
selcuks24-Jul-08 22:35 
Questiongetting system information through C# Pin
Inferi24-Jul-08 10:47
Inferi24-Jul-08 10:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.