textbox value not getting to the asp.vb codebehind code from the html layer.

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: textbox value not getting to the asp.vb codebehind code from the html layer.

    Hi,

    do you set the textbox to default value in page_load. if so use
    Page.IspPostback to disable this setting on postback.

    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

  2. Similar Questions and Discussions

    1. Dreamweaver Update tags and codebehind postback code
      I have a C# .net site built with Dreamweaver MX2004. I have several screens to allow for updating of tables and they use the <MM:UPDATE ... />...
    2. Flash layer on top of normal HTML layer
      I am using z-index to put a flash advertisement with a transparent background at the utmost top layer of my webpage. Since I want it to move...
    3. runat="server"....a simple html textbox or a webform server textbox...that is the question.
      I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the...
    4. Need example: To create Initialize Code für a custom control in CodeBehind File.
      Hallo, I create a Custom WebControl and need to create a initialize Code for that Control in the Codebehind file. my question: how can I crete...
    5. Calling a function in codebehind from the html side of the aspx?
      I read from some book that you can actually on any tag in the html page put a onClick or something and assign it with the sub/function name that is...
  3. #2

    Default RE: textbox value not getting to the asp.vb codebehind code from the html layer.

    Hi Hazzard,

    It seems that you didn't post back the value of the text box to the server.
    So the value won't be changed. You could prove it by setting a breakpoint
    in TextChanged method of your web application to see whether it could be
    hit when running.

    To resolve it, we need to setup a method to post back the data. You could
    do it by adding a button to post back or setting autopostback of this text
    button to true. (I couldn't see the attachment and so I am not sure of if
    it is set)

    Hope this helps.

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided ¡°as is¡± with no warranties and confers no rights.


    Tian Min Huang Guest

  4. #3

    Default Re: textbox value not getting to the asp.vb codebehind code from the html layer.

    It just occurred to me....javascript....duh !?
    I am trying to effect a strictly client side activity and falsely assuming a
    server side control is going to get me there. Wrong assumption.
    -Greg

    "Tian Min Huang" <timhuang@online.microsoft.com> wrote in message
    news:Pm8%23Q7DTDHA.2344@cpmsftngxa06.phx.gbl...
    > Hi Hazzard,
    >
    > It seems that you didn't post back the value of the text box to the
    server.
    > So the value won't be changed. You could prove it by setting a breakpoint
    > in TextChanged method of your web application to see whether it could be
    > hit when running.
    >
    > To resolve it, we need to setup a method to post back the data. You could
    > do it by adding a button to post back or setting autopostback of this text
    > button to true. (I couldn't see the attachment and so I am not sure of if
    > it is set)
    >
    > Hope this helps.
    >
    > Regards,
    >
    > HuangTM
    > Microsoft Online Partner Support
    > MCSE/MCSD
    >
    > Get Secure! ¨C [url]www.microsoft.com/security[/url]
    > This posting is provided ¡°as is¡± with no warranties and confers no
    rights.
    >
    >

    Hazzard Guest

  5. #4

    Default Re: textbox value not getting to the asp.vb codebehind code from the html layer.

    Sorry I did not post HuangTM.

    I solved the problem in the page load using ispostback property. My logic
    works but it looks very disjointed and not very well thought out.Tthe
    beginnings of bad code written in reaction to each new idea instead of with
    a design in mind. Javascript validation yet to be coded but not necessary to
    solve this problem.

    Private Sub Page_Load

    Dim coll As System.Collections.Specialized.NameValueCollection
    coll=Request.QueryString

    If coll.Count = nothing and Not Ispostback then 'Is this a new client form
    to initialize?
    Me.RadioButtonListClientServices.SelectedIndex = -1
    Me.RadioButtonListInvoicingMethod.SelectedIndex = -1
    Me.RadioButtonListDiscretionType.SelectedIndex = -1
    Me.RadioButtonListInvoiceTiming.SelectedIndex = -1
    end if

    if coll.Count > 0 and Not Ispostback then 'Is a value passed in from
    datagrid and not a post back?
    str_LLCLientID = coll.Get(coll.Keys(0).ToString).ToString
    DatabaseFetchDataForEditPage()
    b_EditPage = True
    end if

    if btnInsertCLientInfo.Text = "Save Edit Changes" then
    b_UpdateRecord = True
    UpdateClientRecord()
    End If

    End Sub

    Thank you for standing by and for your help.

    -Greg

    "Tian Min Huang" <timhuang@online.microsoft.com> wrote in message
    news:30lWikeUDHA.1636@cpmsftngxa06.phx.gbl...
    > Hi Greg,
    >
    > I'd like to follow up with you and see if there is any further I can do
    for
    > you. I am standing by for your response.
    >
    > Have a nice day!
    >
    > Regards,
    >
    > HuangTM
    > Microsoft Online Partner Support
    > MCSE/MCSD
    >
    > Get Secure! ¨C [url]www.microsoft.com/security[/url]
    > This posting is provided ¡°as is¡± with no warranties and confers no
    rights.
    >
    >

    Hazzard Guest

Posting Permissions

  • You may not post new threads
  • You may 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