469,575 Members | 1,680 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Change Labels to Textboxes easily?

I have a web form page (.aspx) with 95 label controls that I now need to be
text boxes. Is there an easy way to change those to what I want using
something like a find and replace or am I stuck "changing" each one by hand
by deleting the label and dragging a text box in its place?

Alternatively, the reason I think I need text boxes is that I need to pass
the info in the labels to another page and its not working unless I use a
text box. Is there a way to pass info from labels to another page?

Which problem is easier to solve?

Ken "BiggMakk" McCrory

Nov 19 '05 #1
3 1438
Hi Ken,

Your question is difficult to answer as you've asked it. So far, we know
that your requirements are:

1. You have a page with labels in it containing some sort of data from some
unknown source.
2. You need to "pass the info" in the labels to another page.

These requirements are not complete enough to give a good answer to. First,
where is all this data coming from? Second, what is it for (what do you need
it for)? Is it data that is input by the user? I ask this because apparently
it is not, and a form text box is an input device for the user to input
data. If the data doesn't change, using a form field is a bad idea.

So, backing away for a moment from your interface design, we need to know
what the app is supposed to be doing with this data. The interface design is
dependent upon the business requirements for your app.

For example, assuming that these labels are populated on the server, what is
the requirement that dictates that they should be "passed" to another page?
The other page is on the server as well, and could well grab the data from
the same location on the server as the first page. Can you provide more
information about your specific requirements?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Ken McCrory" <kl*****@removefornospammers.smsu.edu> wrote in message
news:Om**************@TK2MSFTNGP10.phx.gbl...
I have a web form page (.aspx) with 95 label controls that I now need to be
text boxes. Is there an easy way to change those to what I want using
something like a find and replace or am I stuck "changing" each one by
hand
by deleting the label and dragging a text box in its place?

Alternatively, the reason I think I need text boxes is that I need to pass
the info in the labels to another page and its not working unless I use a
text box. Is there a way to pass info from labels to another page?

Which problem is easier to solve?

Ken "BiggMakk" McCrory

Nov 19 '05 #2
This page is a confirmation page of registration information. The labels are
populated from the registration form page using the Request.Params method.
The user process here is (1) fill out the registration form, (2) that info
gets passed to the confirmation page (this page in question) for
confirmation (3) if the user confirms this information then it will get
written to a database and the info gets sent to another page for credit card
processing. HOWEVER, something you said may be another possibility. I could
just write it to the database and on the next page retrieve it back from the
database. I'm going to have to do a query anyway to get the registration
number that the database automatically assigned when the record was written.
I'll still need to pass enough info to perform a SELECT to get the record
back from the database but that's a lot fewer fields than the entire form.

There's still some ways I could have done this better from the beginning but
now I'm in a time crunch to get this online for use so anything that works
is probably going to be the "quickest".

Thanks for the help, past and future.

Ken "BiggMakk" McCrory

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl...
Hi Ken,

Your question is difficult to answer as you've asked it. So far, we know
that your requirements are:

1. You have a page with labels in it containing some sort of data from
some unknown source.
2. You need to "pass the info" in the labels to another page.

These requirements are not complete enough to give a good answer to.
First, where is all this data coming from? Second, what is it for (what do
you need it for)? Is it data that is input by the user? I ask this because
apparently it is not, and a form text box is an input device for the user
to input data. If the data doesn't change, using a form field is a bad
idea.

So, backing away for a moment from your interface design, we need to know
what the app is supposed to be doing with this data. The interface design
is dependent upon the business requirements for your app.

For example, assuming that these labels are populated on the server, what
is the requirement that dictates that they should be "passed" to another
page? The other page is on the server as well, and could well grab the
data from the same location on the server as the first page. Can you
provide more information about your specific requirements?

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.

"Ken McCrory" <kl*****@removefornospammers.smsu.edu> wrote in message
news:Om**************@TK2MSFTNGP10.phx.gbl...
I have a web form page (.aspx) with 95 label controls that I now need to
be
text boxes. Is there an easy way to change those to what I want using
something like a find and replace or am I stuck "changing" each one by
hand
by deleting the label and dragging a text box in its place?

Alternatively, the reason I think I need text boxes is that I need to
pass
the info in the labels to another page and its not working unless I use a
text box. Is there a way to pass info from labels to another page?

Which problem is easier to solve?

Ken "BiggMakk" McCrory


Nov 19 '05 #3
If you need a "edit" and a "preview" page then you could simply just
have a special CSS attribute.
When you are in preview mode set the parent Container to disabled and
using CSS apply a borderless style to your input elements.
try using the following to help give you a better idea of what you
might want to look at.

<asp:Panel Id="bleha" CssClass="myparent">
..myparent input { border:0px; }

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Dalan | last post: by
2 posts views Thread by ooooscar | last post: by
2 posts views Thread by Bob Hollness | last post: by
1 post views Thread by Saso Zagoranski | last post: by
3 posts views Thread by pvong | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.