DD: Complex Dynamic Data field updates

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • markla

    DD: Complex Dynamic Data field updates

    Hi,

    Can someone help me understand why for the code below, when added as a
    "FieldTempl ate" 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="For eignKeyEntry_Ed it.ascx.cs"
    Inherits="Timin g.Web.DD.Foreig nKeyEntry_EditF ield" %>
    <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" CausesValidatio n="true"
    OnTextChanged=" test" >
    </asp:TextBox>
    <asp:Button ID="ButtonLooku p" runat="server" Text="..." />
    <asp:Label ID="Label1" runat="server" BackColor="Red" Width="40" />


    Thanks,
    +Mark

  • Allen Chen [MSFT]

    #2
    RE: DD: Complex Dynamic Data field updates

    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:
    msdnmg@microsof t.com.

    =============== =============== =============== =====
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subs...#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/...tance&ln=en-us.
    =============== =============== =============== =====
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    | From: "markla" <markla@noemail .noemail>
    | 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: <#EVCQCgLJHA.43 60@TK2MSFTNGP02 .phx.gbl>
    | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
    | NNTP-Posting-Host: 203-206-175-81.perm.iinet.n et.au 203.206.175.81
    | Path: TK2MSFTNGHUB02. phx.gbl!TK2MSFT NGP01.phx.gbl!T K2MSFTNGP02.phx .gbl
    | Xref: TK2MSFTNGHUB02. phx.gbl
    microsoft.publi c.dotnet.framew ork.aspnet:7785 1
    | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
    |
    | Hi,
    |
    | Can someone help me understand why for the code below, when added as a
    | "FieldTempl ate" 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="For eignKeyEntry_Ed it.ascx.cs"
    | Inherits="Timin g.Web.DD.Foreig nKeyEntry_EditF ield" %>
    | <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"
    CausesValidatio n="true"
    | OnTextChanged=" test" >
    | </asp:TextBox>
    | <asp:Button ID="ButtonLooku p" runat="server" Text="..." />
    | <asp:Label ID="Label1" runat="server" BackColor="Red" Width="40" />
    |
    |
    | Thanks,
    | +Mark
    |
    |

    Comment

    Working...