I'm using code behind for everything I do, but this is
a down and dirty "edit/add" datagrid page that someone
can hook up to to edit and add records to Access
lookup tables on an ISP. I call it the "Helen Keller
Datagrid" and it includes some lengthy verbage for
each item so that someone can take this one page and
follow the verbage right through to link it up without
using a readme, .vb, etc. The can also be emailed  by
cutting and pasting into the body of an email. HTH :)

Thanks for the heads up on the event handler.

Karen
aka "Florence Nightingale"


--- Greg Ewing <[EMAIL PROTECTED]> wrote:
> Karen, you need to add the event handler to the
> event.  This is done in the Page_Load event and will
> look something like this:
> 
> this.btnAddRecord.Click += new
> System.EventHandler(this.btnAddRecord_Click);
> 
> It's often in code hidden in a region called "Web
> Form Designer generated code" in the code behind but
> can also be in your ASPX.  
> 
> Why aren't you using codebehinds?  You are almost
> always better off with them.
> 
> Greg Ewing [MVP]
> www.citidc.com
> 
> 
> Original Message:
> >From: Karen Kungowski <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: [AspNetAnyQuestionIsOk] Button Click Event
> doesn't fire on page with no code-behind
> >Date: Tue, 25 May 2004 07:45:22 -0700 (PDT)
> 
> >This is at the top:
> >
> ><%@ Import Namespace="System.Data.OLEDB" %>
> ><%@ Page trace="false" debug="true"
> >smartNavigation="False" %>
> >
> >Here is the HTML:
> >
> >                     <asp:Button id="btnAddRecord" runat="server"
> >BorderStyle="Outset" Text="Add"></asp:Button>
> >
> >
> >Here is the event:
> >
> >Sub btnAddRecord_Click(ByVal sender As
> System.Object,
> >ByVal e As System.EventArgs)
> >
> >            Dim t1 As TextBox =
> >FindControl("DanceStyle")
> >            Dim t2 As TextBox =
> >FindControl("DanceStyleWebPage")
> >
> >    strSQL = "INSERT INTO
> >tblDanceStyles(DanceStyle,DanceStyleWebpage)
> VALUES('"
> >& t1.Text & "','" & t2.Text & "')"
> >    
> >    Cmd = New OLEDBCommand(strSQL, Conn)
> >    
> >    Conn = New
>
>OLEDBConnection(fUseThisConnection(Server.MachineName))
> >           
> >    Conn.Open()
> >    Cmd.ExecuteNonQuery()
> >    Cmd.Dispose()
> >    Conn.Close()
> >     BindDataGrid()
> >     
> >   End Sub
> >
> >
> >     
> >             
> >__________________________________
> >Do you Yahoo!?
> >Friends.  Fun.  Try the all-new Yahoo! Messenger.
> >http://messenger.yahoo.com/ 
> >
> >
> >
> > 
> >Yahoo! Groups Links
> >
> >
> >
> > 
> >
> >
> >
> 
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> 
> Yahoo! Domains - Claim yours for only $14.70
>
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
>
--------------------------------------------------------------------~->
> 
> 
>  
> Yahoo! Groups Links
> 
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
> 
>     
> [EMAIL PROTECTED]
> 
>  
> 



        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to