Navigation

Search

Categories

On this page

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 125
This Year: 63
This Month: 0
This Week: 0
Comments: 0

Sign In

 Monday, July 07, 2008
Monday, July 07, 2008 11:17:01 AM (Eastern Standard Time, UTC-05:00) ( )

I frequently create User Controls in our WSS 3.0 environment use SmartPart to deploy them. 

Below is an example of a user control not using code-behind.

LastBAUserLogin.ascx

<%@ Control Language="VB" ClassName="LastBAUserLogin" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Web.Configuration" %>
<%@ Import Namespace="System.Web.UI.UserControl" %>

<script runat="server">
</script>

<asp:UpdatePanel ID="MyUpdatePanel" runat="server">
       <ContentTemplate>
       </ContentTemplate>
 </asp:UpdatePanel>

This is an example utilizing code-behind

staff.directory.ascx

<%@ Control Language="VB" AutoEventWireup="false" codeFile="staff.directory.ascx.vb" Inherits="StaffDirectory" %>

<asp:UpdatePanel ID="MyUpdatePanel" runat="server">
      <ContentTemplate>
      </ContentTemplate>
</asp:UpdatePanel>

staff.directory.ascx.vb

Partial Class StaffDirectory
Inherits System.Web.UI.UserControl

End Class

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):