DD: Complex Dynamic Data field updates

Discussion in 'ASP .Net' started by markla, Oct 14, 2008.

  1. markla

    markla Guest

    Hi,

    Can someone help me understand why for the code below, when added as a
    "FieldTemplate" in Dynamic Data, and rendered for a field, does not trigger
    the "test" function and hence update the label control?

    (CodeBehind is pretty much same as the original shipped ForeignKey_Edit
    code, and an event in the codeBehind does not get fired either)



    <%@ Control Language="C#" CodeBehind="ForeignKeyEntry_Edit.ascx.cs"
    Inherits="Timing.Web.DD.ForeignKeyEntry_EditField" %>
    <link href="~/Site.css" rel="stylesheet" type="text/css" />
    <script runat="server">

    protected void test(Object sender, EventArgs e)
    {
    Label1.Text = TextBox1.Text;
    }

    </script>

    <asp:TextBox ID="TextBox1" runat="server" Width="20" CausesValidation="true"
    OnTextChanged="test" >
    </asp:TextBox>
    <asp:Button ID="ButtonLookup" runat="server" Text="..." />
    <asp:Label ID="Label1" runat="server" BackColor="Red" Width="40" />


    Thanks,
    +Mark
     
    markla, Oct 14, 2008
    #1
    1. Advertising

  2. Hi Mark,

    I've tested your code. It works fine on my side. Maybe a input value is
    invalid?Can you see any validation errors when you click the button?

    If it still doesn't work please send me a demo project. I'll try to
    reproduce it.

    Regards,
    Allen Chen
    Microsoft Online Support

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    | From: "markla" <>
    | Subject: DD: Complex Dynamic Data field updates
    | Date: Wed, 15 Oct 2008 00:27:09 +1100
    | Lines: 4
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | format=flowed;
    | charset="iso-8859-1";
    | reply-type=original
    | Content-Transfer-Encoding: 7bit
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | Importance: Normal
    | X-Newsreader: Microsoft Windows Live Mail 12.0.1606
    | X-MimeOLE: Produced By Microsoft MimeOLE V12.0.1606
    | Message-ID: <#>
    | Newsgroups: microsoft.public.dotnet.framework.aspnet
    | NNTP-Posting-Host: 203-206-175-81.perm.iinet.net.au 203.206.175.81
    | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.phx.gbl
    | Xref: TK2MSFTNGHUB02.phx.gbl
    microsoft.public.dotnet.framework.aspnet:77851
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    |
    | Hi,
    |
    | Can someone help me understand why for the code below, when added as a
    | "FieldTemplate" in Dynamic Data, and rendered for a field, does not
    trigger
    | the "test" function and hence update the label control?
    |
    | (CodeBehind is pretty much same as the original shipped ForeignKey_Edit
    | code, and an event in the codeBehind does not get fired either)
    |
    |
    |
    | <%@ Control Language="C#" CodeBehind="ForeignKeyEntry_Edit.ascx.cs"
    | Inherits="Timing.Web.DD.ForeignKeyEntry_EditField" %>
    | <link href="~/Site.css" rel="stylesheet" type="text/css" />
    | <script runat="server">
    |
    | protected void test(Object sender, EventArgs e)
    | {
    | Label1.Text = TextBox1.Text;
    | }
    |
    | </script>
    |
    | <asp:TextBox ID="TextBox1" runat="server" Width="20"
    CausesValidation="true"
    | OnTextChanged="test" >
    | </asp:TextBox>
    | <asp:Button ID="ButtonLookup" runat="server" Text="..." />
    | <asp:Label ID="Label1" runat="server" BackColor="Red" Width="40" />
    |
    |
    | Thanks,
    | +Mark
    |
    |
     
    Allen Chen [MSFT], Oct 15, 2008
    #2
    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. news.amnet.net.au
    Replies:
    1
    Views:
    597
    =?UTF-8?b?TMSByrtpZSBUZWNoaWU=?=
    Apr 13, 2004
  2. Stanimir Stamenkov
    Replies:
    2
    Views:
    774
    Stanimir Stamenkov
    Oct 25, 2005
  3. Robert Mark Bram
    Replies:
    0
    Views:
    709
    Robert Mark Bram
    Feb 4, 2007
  4. Sound
    Replies:
    2
    Views:
    483
    Randy Webb
    Sep 28, 2006
  5. jr
    Replies:
    3
    Views:
    477
Loading...

Share This Page