Solved

I need to know how to return a dataset from a DB from given a variable paramiter.

Posted on 2004-09-09
2
183 Views
Last Modified: 2010-04-17
I am using asp.vb in Microsofts Visual Web Developer 2005 Express Edition Beta to make a web site.  I have figured out how to graphically put an "SqlDataSource" object on the page and then "Bind" it to various data grids.  The thing works great for returing all the values from my spesified values.  Now I need it to return data based on a text box entry and the click of a button.  I have added my button and my textbox to the page - But I can't figure out how to make the query look at whats in the text box for a parameter then procede to present the results.  I have a basic understanding of ASP.Net (very basic) and of logical syntax.  I can provide further information if it will help.  I just need a little guidance.  Also, for a web application, is this a reasonable way to set up a search for data?  I made the question 500 pts because I think I will need some detail in the answer.  

Thank you,  

-TH
0
Comment
Question by:travishaberman
2 Comments
 
LVL 54

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 12024670
You need to include some VBScript on the page itself to trap the buttons onclick event.

It's been a while since I did this stuff so my syntax may be a bit off but here is the gist of it.

<intpu type=text  ID="txtQuery" ...>
<input type=button value="click me" onclick="fnSetQuery" ID=button1 ...>

Now you need to create the function

Sub fnSetQuery ()

   myform.mysqlconn.Query = txtQuery.text
   ....
' Do the rest of your data stuff here
end sub
0
 

Author Comment

by:travishaberman
ID: 12029724
Thanks for the help.. !  I actually took your bit here and found a toutorial online that showed me step by step as well..
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle query help 18 113
how to send memory stream from ics Client To ics server ? 11 112
Tembedded WB animatid gifs not animated on some pcs 2 80
egit plugin on eclipse 8 64
This is about my first experience with programming Arduino.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question