Hidden Text Field Occasionally Missing Data on Postback

Discussion in 'ASP .Net' started by =?Utf-8?B?UGF1bCBSZWVk?=, Sep 24, 2007.

  1. Greetings.

    I have an app that's been in production for 3-4 years that is hosted at an
    ISP. I have an aspx control on the page that uses a few hidden text fields
    for repositioning logic executed on the server postback. These text fields
    "always" have data in them. About 5 months ago we started to receive
    intermitent errors that reveals at postback the value in the text field's
    value is gone.

    I am wondering if there hasn't been an upgrade or something at the ISP that
    somehow is causing this intermittent problem. It happens regardless of the
    version of IE we are using. It happens both during high volume during the day
    but also in the off hours...so server loading doesn't seem to be the issue.

    This is so weird...of course the ISP wants to say its our code...and I'd
    love for it to be...but this logic has not been touched in a few years.

    Any ideas...sorry it's not much to go on.

    Regards,

    Paul



    ---------------------------------------
    Jackson-Reed, Inc. www.jacksonreed.com
    =?Utf-8?B?UGF1bCBSZWVk?=, Sep 24, 2007
    #1
    1. Advertising

  2. I'm not sure if this is the issue, but here are two things you should make
    sure of:

    Since your code was obviously written in ASP.NET 1.1 if it has been in
    production for 3-4 years:
    1. Make sure your server still supports .NET 1.1
    2. Make sure all your code is in the same version of .NET; ASP.NET 1.1 and
    2.0 are not compatible with each other

    I'm not sure what else to say right now, since I haven't seen the code, but
    I would suggest migrating the code to ASP.NET 2.0 (or if you want to wait
    for it, the soon to come 3.0) if you haven't already. Migrating from 1.1 to
    2.0 can be a big task, but it is usually worth it, and it makes it easier to
    write code using Visual Studio 2005 (you don't have to worry about telling
    it what version of .NET you want your code compiled to, you would have to do
    this if you want your code compiled to 1.1). If you post your code, someone
    (maybe even me) might be able to help you more. Good Luck!
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Paul Reed" <> wrote in message
    news:...
    > Greetings.
    >
    > I have an app that's been in production for 3-4 years that is hosted at an
    > ISP. I have an aspx control on the page that uses a few hidden text fields
    > for repositioning logic executed on the server postback. These text fields
    > "always" have data in them. About 5 months ago we started to receive
    > intermitent errors that reveals at postback the value in the text field's
    > value is gone.
    >
    > I am wondering if there hasn't been an upgrade or something at the ISP
    > that
    > somehow is causing this intermittent problem. It happens regardless of the
    > version of IE we are using. It happens both during high volume during the
    > day
    > but also in the off hours...so server loading doesn't seem to be the
    > issue.
    >
    > This is so weird...of course the ISP wants to say its our code...and I'd
    > love for it to be...but this logic has not been touched in a few years.
    >
    > Any ideas...sorry it's not much to go on.
    >
    > Regards,
    >
    > Paul
    >
    >
    >
    > ---------------------------------------
    > Jackson-Reed, Inc. www.jacksonreed.com
    Nathan Sokalski, Sep 24, 2007
    #2
    1. Advertising

  3. "Paul Reed" <> wrote in message
    news:...

    > These text fields "always" have data in them.


    Where does the data come from...?


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Sep 24, 2007
    #3
  4. Mark,

    In this case it is a Date which represents the current view of a schdule.
    This data is placed in the hidden field when the page is first sent to the
    client...which is subsequently posted back.

    Paul

    ---------------------------------------
    Jackson-Reed, Inc. www.jacksonreed.com


    "Mark Rae [MVP]" wrote:

    > "Paul Reed" <> wrote in message
    > news:...
    >
    > > These text fields "always" have data in them.

    >
    > Where does the data come from...?
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    >
    >
    =?Utf-8?B?UGF1bCBSZWVk?=, Sep 24, 2007
    #4
  5. Nathan,

    Yes...I've been dreading upgrading to 2.0. Actually many of my clients are
    still on hold as well with that. I am using a lot of the Infragistic's stuff
    and Crystal so I am sure that will all be fun.

    Regarding versions...my Error message that comes back shows both the
    framework and ASP as 1.1.4322.2407 (so its service pack 1 for version 1.1). I
    am also going to investigate if any of the hotfix rollups have been applied
    by the ISP that were issued after the 1.1. service pack was released.

    Here is the code...

    Private Sub btnPrevMo_Click(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles btnPrevMo.Click
    Dim workDate As New Date()

    'Lets PreRender know that a control event caused postback
    controlHandled = True

    workDate = CDate(txtBeginDate.Text)

    setupDates(workDate.AddMonths(-1))

    'build the schedule
    buildSchedule()
    End Sub

    The line of code that fails is the CDate(txtBeginDate.Text) where the
    BeginDate for some reason has nothing in it...thus I get a cast failure. This
    field should never be blank...ever...

    Thanks...

    Paul




    --
    ---------------------------------------
    Jackson-Reed, Inc. www.jacksonreed.com


    "Nathan Sokalski" wrote:

    > I'm not sure if this is the issue, but here are two things you should make
    > sure of:
    >
    > Since your code was obviously written in ASP.NET 1.1 if it has been in
    > production for 3-4 years:
    > 1. Make sure your server still supports .NET 1.1
    > 2. Make sure all your code is in the same version of .NET; ASP.NET 1.1 and
    > 2.0 are not compatible with each other
    >
    > I'm not sure what else to say right now, since I haven't seen the code, but
    > I would suggest migrating the code to ASP.NET 2.0 (or if you want to wait
    > for it, the soon to come 3.0) if you haven't already. Migrating from 1.1 to
    > 2.0 can be a big task, but it is usually worth it, and it makes it easier to
    > write code using Visual Studio 2005 (you don't have to worry about telling
    > it what version of .NET you want your code compiled to, you would have to do
    > this if you want your code compiled to 1.1). If you post your code, someone
    > (maybe even me) might be able to help you more. Good Luck!
    > --
    > Nathan Sokalski
    >
    > http://www.nathansokalski.com/
    >
    > "Paul Reed" <> wrote in message
    > news:...
    > > Greetings.
    > >
    > > I have an app that's been in production for 3-4 years that is hosted at an
    > > ISP. I have an aspx control on the page that uses a few hidden text fields
    > > for repositioning logic executed on the server postback. These text fields
    > > "always" have data in them. About 5 months ago we started to receive
    > > intermitent errors that reveals at postback the value in the text field's
    > > value is gone.
    > >
    > > I am wondering if there hasn't been an upgrade or something at the ISP
    > > that
    > > somehow is causing this intermittent problem. It happens regardless of the
    > > version of IE we are using. It happens both during high volume during the
    > > day
    > > but also in the off hours...so server loading doesn't seem to be the
    > > issue.
    > >
    > > This is so weird...of course the ISP wants to say its our code...and I'd
    > > love for it to be...but this logic has not been touched in a few years.
    > >
    > > Any ideas...sorry it's not much to go on.
    > >
    > > Regards,
    > >
    > > Paul
    > >
    > >
    > >
    > > ---------------------------------------
    > > Jackson-Reed, Inc. www.jacksonreed.com

    >
    >
    >
    =?Utf-8?B?UGF1bCBSZWVk?=, Sep 24, 2007
    #5
  6. Does txtBeginDate have ViewState enabled? You must have
    EnableViewState="True" (which is the default, so you can usually simply not
    specify this property) in order to retrieve the value from a Control during
    postback.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Paul Reed" <> wrote in message
    news:...
    > Nathan,
    >
    > Yes...I've been dreading upgrading to 2.0. Actually many of my clients are
    > still on hold as well with that. I am using a lot of the Infragistic's
    > stuff
    > and Crystal so I am sure that will all be fun.
    >
    > Regarding versions...my Error message that comes back shows both the
    > framework and ASP as 1.1.4322.2407 (so its service pack 1 for version
    > 1.1). I
    > am also going to investigate if any of the hotfix rollups have been
    > applied
    > by the ISP that were issued after the 1.1. service pack was released.
    >
    > Here is the code...
    >
    > Private Sub btnPrevMo_Click(ByVal sender As Object, ByVal e As
    > System.EventArgs) Handles btnPrevMo.Click
    > Dim workDate As New Date()
    >
    > 'Lets PreRender know that a control event caused postback
    > controlHandled = True
    >
    > workDate = CDate(txtBeginDate.Text)
    >
    > setupDates(workDate.AddMonths(-1))
    >
    > 'build the schedule
    > buildSchedule()
    > End Sub
    >
    > The line of code that fails is the CDate(txtBeginDate.Text) where the
    > BeginDate for some reason has nothing in it...thus I get a cast failure.
    > This
    > field should never be blank...ever...
    >
    > Thanks...
    >
    > Paul
    >
    >
    >
    >
    > --
    > ---------------------------------------
    > Jackson-Reed, Inc. www.jacksonreed.com
    >
    >
    > "Nathan Sokalski" wrote:
    >
    >> I'm not sure if this is the issue, but here are two things you should
    >> make
    >> sure of:
    >>
    >> Since your code was obviously written in ASP.NET 1.1 if it has been in
    >> production for 3-4 years:
    >> 1. Make sure your server still supports .NET 1.1
    >> 2. Make sure all your code is in the same version of .NET; ASP.NET 1.1
    >> and
    >> 2.0 are not compatible with each other
    >>
    >> I'm not sure what else to say right now, since I haven't seen the code,
    >> but
    >> I would suggest migrating the code to ASP.NET 2.0 (or if you want to wait
    >> for it, the soon to come 3.0) if you haven't already. Migrating from 1.1
    >> to
    >> 2.0 can be a big task, but it is usually worth it, and it makes it easier
    >> to
    >> write code using Visual Studio 2005 (you don't have to worry about
    >> telling
    >> it what version of .NET you want your code compiled to, you would have to
    >> do
    >> this if you want your code compiled to 1.1). If you post your code,
    >> someone
    >> (maybe even me) might be able to help you more. Good Luck!
    >> --
    >> Nathan Sokalski
    >>
    >> http://www.nathansokalski.com/
    >>
    >> "Paul Reed" <> wrote in message
    >> news:...
    >> > Greetings.
    >> >
    >> > I have an app that's been in production for 3-4 years that is hosted at
    >> > an
    >> > ISP. I have an aspx control on the page that uses a few hidden text
    >> > fields
    >> > for repositioning logic executed on the server postback. These text
    >> > fields
    >> > "always" have data in them. About 5 months ago we started to receive
    >> > intermitent errors that reveals at postback the value in the text
    >> > field's
    >> > value is gone.
    >> >
    >> > I am wondering if there hasn't been an upgrade or something at the ISP
    >> > that
    >> > somehow is causing this intermittent problem. It happens regardless of
    >> > the
    >> > version of IE we are using. It happens both during high volume during
    >> > the
    >> > day
    >> > but also in the off hours...so server loading doesn't seem to be the
    >> > issue.
    >> >
    >> > This is so weird...of course the ISP wants to say its our code...and
    >> > I'd
    >> > love for it to be...but this logic has not been touched in a few years.
    >> >
    >> > Any ideas...sorry it's not much to go on.
    >> >
    >> > Regards,
    >> >
    >> > Paul
    >> >
    >> >
    >> >
    >> > ---------------------------------------
    >> > Jackson-Reed, Inc. www.jacksonreed.com

    >>
    >>
    >>
    Nathan Sokalski, Sep 25, 2007
    #6
  7. Nathan,

    Yes...it is enabled. Again, what's odd...is that this app has been working
    just fine...the problem is intermittent and we can't duplicate in our dev
    environ. I checked the ISPs version of of .NET and we are using the same
    thing. Argggg!

    Regards,

    Paul
    --
    ---------------------------------------
    Jackson-Reed, Inc. www.jacksonreed.com


    "Nathan Sokalski" wrote:

    > Does txtBeginDate have ViewState enabled? You must have
    > EnableViewState="True" (which is the default, so you can usually simply not
    > specify this property) in order to retrieve the value from a Control during
    > postback.
    > --
    > Nathan Sokalski
    >
    > http://www.nathansokalski.com/
    >
    > "Paul Reed" <> wrote in message
    > news:...
    > > Nathan,
    > >
    > > Yes...I've been dreading upgrading to 2.0. Actually many of my clients are
    > > still on hold as well with that. I am using a lot of the Infragistic's
    > > stuff
    > > and Crystal so I am sure that will all be fun.
    > >
    > > Regarding versions...my Error message that comes back shows both the
    > > framework and ASP as 1.1.4322.2407 (so its service pack 1 for version
    > > 1.1). I
    > > am also going to investigate if any of the hotfix rollups have been
    > > applied
    > > by the ISP that were issued after the 1.1. service pack was released.
    > >
    > > Here is the code...
    > >
    > > Private Sub btnPrevMo_Click(ByVal sender As Object, ByVal e As
    > > System.EventArgs) Handles btnPrevMo.Click
    > > Dim workDate As New Date()
    > >
    > > 'Lets PreRender know that a control event caused postback
    > > controlHandled = True
    > >
    > > workDate = CDate(txtBeginDate.Text)
    > >
    > > setupDates(workDate.AddMonths(-1))
    > >
    > > 'build the schedule
    > > buildSchedule()
    > > End Sub
    > >
    > > The line of code that fails is the CDate(txtBeginDate.Text) where the
    > > BeginDate for some reason has nothing in it...thus I get a cast failure.
    > > This
    > > field should never be blank...ever...
    > >
    > > Thanks...
    > >
    > > Paul
    > >
    > >
    > >
    > >
    > > --
    > > ---------------------------------------
    > > Jackson-Reed, Inc. www.jacksonreed.com
    > >
    > >
    > > "Nathan Sokalski" wrote:
    > >
    > >> I'm not sure if this is the issue, but here are two things you should
    > >> make
    > >> sure of:
    > >>
    > >> Since your code was obviously written in ASP.NET 1.1 if it has been in
    > >> production for 3-4 years:
    > >> 1. Make sure your server still supports .NET 1.1
    > >> 2. Make sure all your code is in the same version of .NET; ASP.NET 1.1
    > >> and
    > >> 2.0 are not compatible with each other
    > >>
    > >> I'm not sure what else to say right now, since I haven't seen the code,
    > >> but
    > >> I would suggest migrating the code to ASP.NET 2.0 (or if you want to wait
    > >> for it, the soon to come 3.0) if you haven't already. Migrating from 1.1
    > >> to
    > >> 2.0 can be a big task, but it is usually worth it, and it makes it easier
    > >> to
    > >> write code using Visual Studio 2005 (you don't have to worry about
    > >> telling
    > >> it what version of .NET you want your code compiled to, you would have to
    > >> do
    > >> this if you want your code compiled to 1.1). If you post your code,
    > >> someone
    > >> (maybe even me) might be able to help you more. Good Luck!
    > >> --
    > >> Nathan Sokalski
    > >>
    > >> http://www.nathansokalski.com/
    > >>
    > >> "Paul Reed" <> wrote in message
    > >> news:...
    > >> > Greetings.
    > >> >
    > >> > I have an app that's been in production for 3-4 years that is hosted at
    > >> > an
    > >> > ISP. I have an aspx control on the page that uses a few hidden text
    > >> > fields
    > >> > for repositioning logic executed on the server postback. These text
    > >> > fields
    > >> > "always" have data in them. About 5 months ago we started to receive
    > >> > intermitent errors that reveals at postback the value in the text
    > >> > field's
    > >> > value is gone.
    > >> >
    > >> > I am wondering if there hasn't been an upgrade or something at the ISP
    > >> > that
    > >> > somehow is causing this intermittent problem. It happens regardless of
    > >> > the
    > >> > version of IE we are using. It happens both during high volume during
    > >> > the
    > >> > day
    > >> > but also in the off hours...so server loading doesn't seem to be the
    > >> > issue.
    > >> >
    > >> > This is so weird...of course the ISP wants to say its our code...and
    > >> > I'd
    > >> > love for it to be...but this logic has not been touched in a few years.
    > >> >
    > >> > Any ideas...sorry it's not much to go on.
    > >> >
    > >> > Regards,
    > >> >
    > >> > Paul
    > >> >
    > >> >
    > >> >
    > >> > ---------------------------------------
    > >> > Jackson-Reed, Inc. www.jacksonreed.com
    > >>
    > >>
    > >>

    >
    >
    >
    =?Utf-8?B?UGF1bCBSZWVk?=, Sep 25, 2007
    #7
    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. Rodusa
    Replies:
    2
    Views:
    6,366
    Rodusa
    Feb 15, 2005
  2. Rick
    Replies:
    3
    Views:
    8,092
    Alexey Smirnov
    Apr 13, 2010
  3. Roy Adams

    writing from hidden field to text field

    Roy Adams, Dec 20, 2004, in forum: Javascript
    Replies:
    1
    Views:
    182
  4. Roy Adams
    Replies:
    3
    Views:
    255
    Dr John Stockton
    Dec 21, 2004
  5. SolarCanine
    Replies:
    2
    Views:
    251
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page