Querying Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using Visual Web Developer 2005 Express Edition with SQL Express and I'm
a beginner.

I'm developing pages for my churches website which allow users to select
attributes for a class (e.g. time, focus of class, class size, etc.). I want
to take the user's selections, query the database, find the matching classes
and display the results in another page.

I'm currently building a SQL string in the first page and passing it to the
second page. Based on what I've read, it sounds like this leaves the site
open to an attack.

My questions are:
1. Is it possible in asp.net to take input from one form and post the
results to a second form?

2. How can I use the SQL string to query the database in the second form?

I hope my questions make sense, like I said I'm very new to ASP.Net so any
and all help is greatly appreciated. If anyone can recommend some websites
that help walk me through the steps, I would appreciate that as well.

Thanks for you time!
Lisa C.
 
Lisa

Are you sure that the strings are in the Web page as the user sees those. To
show this I will try to tell in short how ASPNET is working.

Tier 1
The browser holds a HTML page with a lot of javascript. That page is send to
your ASPNET application, which serves all the clients for that application.
Tier 2
The ASPNET webapllication does 2 things for all clients who uses this. It
creates HTML/JavaScript pages and it access the database to get the
information from. That later information is got with SQL script.
Tier 3
The SQL server processes the commands it gets by SQL Script (even if this is
a command to process a stored procedure) and gives the results back to your
Tier in the middle: the ASPNET application.

Therefore are you sure that the SQL scripts reach the HTML/JavaScript pages?

Cor
 
Cor,

No, I'm not sure the SQL scripts are reaching the HTML/JavaScript page. I
can display the actual string on the 2nd page in a label. I don't know how to
assign the string to the SQL command.

Thanks for responding so quickly to my post! I really appreciate the help.
Lisa
 
Lisa,

The later I certainly would not do, but I and probably most of us, don't
really not understand what you are doing, than that you are showing two
pages one after the other, therefore explain it a little bit?

Cor
 
Back
Top