Change Labels to Textboxes easily?

Discussion in 'ASP .Net' started by Ken McCrory, Mar 9, 2005.

  1. Ken McCrory

    Ken McCrory Guest

    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
     
    Ken McCrory, Mar 9, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    >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
    >
    >
    >
     
    Kevin Spencer, Mar 9, 2005
    #2
    1. Advertising

  3. Ken McCrory

    Ken McCrory Guest

    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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >>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
    >>
    >>
    >>

    >
    >
     
    Ken McCrory, Mar 9, 2005
    #3
  4. Ken McCrory

    Guest

    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; }
     
    , Mar 9, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rathtap
    Replies:
    0
    Views:
    421
    Rathtap
    Jun 23, 2004
  2. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    "Attached" Labels for TextBoxes, etc.?

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, May 17, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    335
    Steven Cheng[MSFT]
    May 19, 2006
  3. Dgreer
    Replies:
    1
    Views:
    252
  4. Ziangi Jones

    Adjustment of hidden textboxes, labels

    Ziangi Jones, Aug 2, 2007, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    153
    Manish Bafna
    Aug 3, 2007
  5. Graham Nicholls
    Replies:
    6
    Views:
    167
    Robert Klemme
    Oct 12, 2004
Loading...

Share This Page