473,386 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ASP.NET 2.0 Project - Design Issue?

Hi -

I have a few Classic ASP projects that I would like to convert to ASP.NET
2.0. I've been learning ASP.NET 2.0 for the past few months.

One of the ASP projects that I'm converting is a simple HTML form that
allows the user to select a few options for a query. Based on their input,
I would dynamically build a SQL query to perform a search based on their
information. I.E., I may have a listbox that allows them to find a text
string for today, last 3 days, last week, last month, or all.

Anyway, after they select their information and hit submit, I then run the
query and create a new page listing the results. It is essentially like a
datagrid listing.

I've been wondering how I can accomplish this same task with ASP.NET 2.0. I
would like to us Data Binding if possible.

One of my challenges is how to have a "Query Form" and a "Results" form. Do
I need two pages or should I simply use the same page for both?

If I use the same page, how do I hide the datagrid until they select a query
option. If they need to run the query again, I want them to click a "Home"
link or soemthing to go back to just the query form.

It would seem most of the GridView examples I've seen online and via
Micosoft webcasts and just too simple to be used in real-world scenarios. I
know most of the time they're simply demonstrating the functionality, but I
seriously cannot see any websites actually implementing the forms and junk
the way they present.

Any insight or examples to this would be appreciated.

Jan 18 '06 #1
2 1181
You can use the same page, just check for IsPostBack in order to know that
your grid needs to be bound.
You can also put the input controls in a panel and set its visibility on /
off.

Also, you will be a lot better off using stored procedures with input
parameters and
CASE --WHEN statments for the where clause.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"dm1608" wrote:
Hi -

I have a few Classic ASP projects that I would like to convert to ASP.NET
2.0. I've been learning ASP.NET 2.0 for the past few months.

One of the ASP projects that I'm converting is a simple HTML form that
allows the user to select a few options for a query. Based on their input,
I would dynamically build a SQL query to perform a search based on their
information. I.E., I may have a listbox that allows them to find a text
string for today, last 3 days, last week, last month, or all.

Anyway, after they select their information and hit submit, I then run the
query and create a new page listing the results. It is essentially like a
datagrid listing.

I've been wondering how I can accomplish this same task with ASP.NET 2.0. I
would like to us Data Binding if possible.

One of my challenges is how to have a "Query Form" and a "Results" form. Do
I need two pages or should I simply use the same page for both?

If I use the same page, how do I hide the datagrid until they select a query
option. If they need to run the query again, I want them to click a "Home"
link or soemthing to go back to just the query form.

It would seem most of the GridView examples I've seen online and via
Micosoft webcasts and just too simple to be used in real-world scenarios. I
know most of the time they're simply demonstrating the functionality, but I
seriously cannot see any websites actually implementing the forms and junk
the way they present.

Any insight or examples to this would be appreciated.

Jan 18 '06 #2
Thanks for the feedback.

Do you have a sample of how to do this? I mean, with a simple form that
prompts for username, password, and perhaps a listbox where its values will
be for the where date range.

I'm familiar with a SP and can create one for this.

I'm just uncertain about the form and datagrid results on same page and how
to bind via code.


"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:12**********************************@microsof t.com...
You can use the same page, just check for IsPostBack in order to know that
your grid needs to be bound.
You can also put the input controls in a panel and set its visibility on /
off.

Also, you will be a lot better off using stored procedures with input
parameters and
CASE --WHEN statments for the where clause.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"dm1608" wrote:
Hi -

I have a few Classic ASP projects that I would like to convert to ASP.NET
2.0. I've been learning ASP.NET 2.0 for the past few months.

One of the ASP projects that I'm converting is a simple HTML form that
allows the user to select a few options for a query. Based on their
input,
I would dynamically build a SQL query to perform a search based on their
information. I.E., I may have a listbox that allows them to find a text
string for today, last 3 days, last week, last month, or all.

Anyway, after they select their information and hit submit, I then run
the
query and create a new page listing the results. It is essentially like
a
datagrid listing.

I've been wondering how I can accomplish this same task with ASP.NET 2.0.
I
would like to us Data Binding if possible.

One of my challenges is how to have a "Query Form" and a "Results" form.
Do
I need two pages or should I simply use the same page for both?

If I use the same page, how do I hide the datagrid until they select a
query
option. If they need to run the query again, I want them to click a
"Home"
link or soemthing to go back to just the query form.

It would seem most of the GridView examples I've seen online and via
Micosoft webcasts and just too simple to be used in real-world scenarios.
I
know most of the time they're simply demonstrating the functionality, but
I
seriously cannot see any websites actually implementing the forms and
junk
the way they present.

Any insight or examples to this would be appreciated.

Jan 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mark | r | last post by:
is there an industry standard method of costing out a project the problem i have is that when talking to a developer they say "i dont know how long it will take" which just isnt acceptable #...
51
by: nospam | last post by:
THIS IS the DOTNETJUNKIES MESSAGE ------------------------- We're Sorry As many of you know we have recently launched SqlJunkies.com. We have overhauled our runtime and will be using it on...
5
by: Arun Bhalla | last post by:
I'm working with VS.NET 2003 and .NET 1.1 (not SP1) on Windows XP SP1. My application is using the Windows Installer Bootstrap. (I may have also installed a module which detects requirements (.NET...
3
by: Aditi | last post by:
hi all...i m a software engg. student completed my 2nd yr...i have been asked to make a project during these summer vacations...and hereby i would like to invite some ideas bout the design and...
1
by: Steven T. Hatton | last post by:
I think Danny was one cup of coffee shy of full consciousness when he wrote this, but the gist of it makes sens to me: "C++ Project Organization Guidelines Last updated May 26, 2005....
1
by: athos | last post by:
Hi all, Believe you have sound experience in development, however, if we look at the whole Software Development Life Cycle (SDLC) of the project, say, 1. Project Initiation, 2. Gathering...
8
by: Adam Clauss | last post by:
I have a folder containing many subfolders (and subfolders and....) all containing various .cs files. Is there any "easy" way to get them all added to the solution. Preferable would be that the...
3
by: John Murray | last post by:
Hi, I'm setting up a project management website, and having a bit of trouble. As part of the site, I have been asked to have a javascript dropdown menu that will open several MS Project (mpp)...
4
by: luna | last post by:
i had errors in my 2003 project, but 2003 allowed me to ignore them and carry on, it displayed my page fine, (even on build) since converting to 2005 i have hundreds of errors and it wont allow me...
10
by: AG | last post by:
I am trying to use a ReportViewer control in a VS 2005 web application project (not Website project). When I try to create a new report (local), I can't seem to find any method to create a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.