DD: Complex Dynamic Data field updates

  • Thread starter Thread starter markla
  • Start date Start date
M

markla

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
 
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:
(e-mail address removed).

==================================================
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" <[email protected]>
| 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: <#[email protected]>
| 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
|
|
 
Back
Top