Professional Web Applications Themes

Textbox control not posting value ? - ASP.NET Building Controls

I have a text box control in an ASP.NET user control and it does not post its value when the base form posts. The value comes through as a null lenght string. Any ideas ?...

  1. #1

    Default Textbox control not posting value ?

    I have a text box control in an ASP.NET user control and it does not post
    its value when the base form posts.
    The value comes through as a null lenght string.
    Any ideas ?


    Da Rabit Guest

  2. #2

    Default Re: Textbox control not posting value ?

    Da Rabit, make sure you have the EnableViewState property of the
    textbox set to true.

    Jason Bentley
    [url]http://geekswithblogs.net/jbentley[/url]

    imsinc@gmail.com Guest

  3. #3

    Default Re: Textbox control not posting value ?

    Tried that and it doesnt work !! The page / control combination used to work
    but for the last week, the controls value is not posting ( to the control
    code behind class!!)

    <imsinc> wrote in message
    news:1110893916.514830.100190f14g2000cwb.googlegr oups.com...
    > Da Rabit, make sure you have the EnableViewState property of the
    > textbox set to true.
    >
    > Jason Bentley
    > [url]http://geekswithblogs.net/jbentley[/url]
    >

    Da Rabit Guest

  4. #4

    Default Re: Textbox control not posting value ?

    There really is not alot of information to go on here. There are a wide
    variety of things that could be happening.

    What follows is a checklist:
    1) Make sure that you are setting ID's on your CustomUser Control and
    the Textbox.
    2) Make sure you are adding the controls to their appropriate
    parents/containers within a nominal time. I recommend doing so in
    OnInit
    3) Make sure that your WebUserControl is implementing INamingContainer
    4) Make sure you are not clearing the value in some event that gets
    triggered every time, like Page_Load etc.

    recoil@community.nospam Guest

  5. #5

    Default Re: Textbox control not posting value ?

    Rabit, also make sure there is a protected variable in your code behind
    corresponding to the textbox control.

    Jason Bentley
    [url]http://geekswithblogs.net/jbentley[/url]

    Jason Bentley Guest

Similar Threads

  1. GridView Control is not posting back correctly
    By Muhammad Usman in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: October 26th, 08:05 AM
  2. Help with Customized TextBox control.
    By Sanjay Pais in forum ASP.NET Building Controls
    Replies: 2
    Last Post: August 9th, 04:14 AM
  3. Textbox control source
    By Matt Williamson in forum Microsoft Access
    Replies: 5
    Last Post: August 1st, 03:03 PM
  4. Replies: 0
    Last Post: July 16th, 06:51 PM
  5. CSS & ASP.NET Textbox Control
    By Beza in forum ASP.NET General
    Replies: 0
    Last Post: June 26th, 02:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139