vs 2005 migration problems

Discussion in 'ASP .Net' started by DS, Apr 5, 2006.

  1. DS

    DS Guest

    I am trying to migrate a vs 2003 asp.net application to vs 2005 and am
    having many problems. After dealing with 300+ compile errors after
    conversion now I have many run time error. I lot of them seem to be
    related to client script problems. Does vs 2005 handle client script
    differently than 2003?

    One of my problems is that some of my control events are not being
    called. For example I have a textbox control:
    <asp:textbox id=txtDate tabIndex="3" runat="server" Height="19px"
    CssClass="textboxreadonly" Width="130px" MaxLength="10"
    ReadOnly="True">

    In client script I have this sub that is no longer being called after
    the conversion:
    sub txtDate_OnChange
    document.frmTaskDetails.hDueDateChanged.Value =
    document.frmTaskDetails.txtDate.value
    EnableCmdSave()
    end sub

    I then tried to add this to my asp:textbox tag:
    onChange="txtDate_OnChange"

    And it's still will not working.
    Any help would be greatly appreciated.
    Thanks in advance for all help!!!!
    Deidre
     
    DS, Apr 5, 2006
    #1
    1. Advertising

  2. DS

    sirfunusa Guest

    Well you know you have runat="server" so your onchange is going to run
    server side.
     
    sirfunusa, Apr 5, 2006
    #2
    1. Advertising

  3. DS

    DS Guest

    I want it to do both. In vs 2003 it did both. First it check for client
    events then server events.
    It seems to be working for some of my other textboxes. It seems to have
    something to do with this textbox not being manually entered by the
    user. It has a calendar popup that is passing back a data that I am
    using to value the textbox in this client sub:
    sub SetDateNHidePopUp (dtDate)
    document.all.ifrmCalendar.style.visibility = "hidden"
    if IsDate(dtDate) then
    Select Case miDateField
    Case enuDUEDATE
    document.frmTaskDetails.txtDate.value = dtDate

    Case enuCLOSEDATE
    document.frmTaskDetails.txtClosedDate.value = dtDate
    End Select

    end sub
     
    DS, Apr 5, 2006
    #3
  4. DS

    DS Guest

    I figured it out. I had to change my textbox readonly property from
    true to false and handle my readonly on client events. Apparently if
    you make a textbox in vs2005 readonly it does return changes to the
    server or call client script on events.
    Hope this helps someone else.
    Deidre
     
    DS, Apr 5, 2006
    #4
  5. DS

    DS Guest

    Now I have another problem. Now that I changed the textbox to
    readonly=false. I added script to the client onpaste, onchange,
    onkeypress to window.event.keycode = 0. But it's still allowing me to
    delete and paste in the textbox. I tried setting enabled property to
    true but I don't like that it makes the text gray. Is there any way to
    override that or a client script to stop the delete and pasting?
    Thanks for helping.
    Deidre
     
    DS, Apr 6, 2006
    #5
    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. Artek
    Replies:
    3
    Views:
    2,766
    Steven Cheng[MSFT]
    Feb 14, 2004
  2. Shivakumar

    VS.NET 2005 Migration problem

    Shivakumar, Nov 17, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    2,810
    lnong
    Jun 4, 2008
  3. Bonggoy Cruz

    VS 2003 to VS 2005 Migration Issues

    Bonggoy Cruz, Apr 7, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    3,802
    Teemu Keiski
    Apr 8, 2006
  4. Thampi
    Replies:
    0
    Views:
    586
    Thampi
    Nov 18, 2006
  5. Boni Satani
    Replies:
    0
    Views:
    171
    Boni Satani
    Jan 9, 2014
Loading...

Share This Page