On the presentation layer: <% Page Inherits="myPage" CodeBehind="myPage.aspx.cs" %>
<html> <head> <title>My Page</title> </head> <body> Customer Name: <asp:textbox id="txtCustomer" width="462px" maxlength="150" text="hello there!" runat="server" /> <br> <asp:button id="btnSave" text="Save" runat="server" cssclass="button" /> </body> </html> Codebehind: using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; public class maintainGroup : System.Web.UI.Page { protected System.Web.UI.WebControls.TextBox txtCustomer; protected System.Web.UI.WebControls.Button btnSave; // Runs when the page loads protected void Page_Load(object sender, System.EventArgs e) { // Although there are defaults to the textbox, we can change them at runtime. // Let's give the textbox some text. txtCustomer.Text = "Goodbye!"; // Let's give it a maxlength. txtCustomer.MaxLength = 255; // Let's make the button call a method when it's clicked. btnSave.Click += new EventHandler(this.FooBar); } protected void FooBar(object sender, System.EventArgs e) { // Let's change the text in the button. btnSave.Text = "You clicked me!"; } } ----- Original Message ----- From: Raymond Camden <[EMAIL PROTECTED]> Date: Thursday, July 17, 2003 1:04 pm Subject: RE: RE: MSDN on CF -> ASP.net > Can you give an example of how ASPX would alter the textbox before it > gets returned to the user? > > ======================================================================== > === > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc > (www.mindseye.com) > Member of Team Macromedia > (http://www.macromedia.com/go/teammacromedia) > Email : [EMAIL PROTECTED] > Blog : www.camdenfamily.com/morpheus/blog > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > > -----Original Message----- > > From: [EMAIL PROTECTED] [EMAIL PROTECTED] > > Sent: Thursday, July 17, 2003 12:52 PM > > To: CF-Talk > > Subject: Re: RE: MSDN on CF -> ASP.net > > > > > > No, actually with your model (and Jon's) this is somewhat > > possible (it'd be somehat annoying to differentiate between > > two textboxes on the same page, for instance). > > > > What I'm saying is that there's no way for CF to change the > > textbox after the user requests a page and CF sees the tag > > and renders it (since in CF, this is one action) but before > > it delivers it to the user. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4