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. 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.
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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
#...
|
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...
|
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...
|
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...
|
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....
|
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...
|
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...
|
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)...
|
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...
|
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...
|
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,...
|
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$) {
}
...
|
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...
|
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
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |