Solved

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

Posted on 2004-09-09
2
181 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 51

Accepted Solution

by:
Julian Hansen earned 500 total points
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now