Skip to content

Instantly share code, notes, and snippets.

@tonywok
Created August 5, 2009 18:09
Show Gist options
  • Save tonywok/162866 to your computer and use it in GitHub Desktop.
Save tonywok/162866 to your computer and use it in GitHub Desktop.
<asp:FormView ID="FormView1" runat="server" DataKeyNames="id" DataSourceID="StudentProfilesDataSource">
<EditItemTemplate>
id:
<asp:Label ID="idLabel1" runat="server" Text='<%# Eval("id") %>'></asp:Label>
<br />
LastName:
<asp:TextBox ID="LastNameTextBox" runat="server" Text='<%# Bind("LastName") %>'>
</asp:TextBox>
<br />
FirstName:
<asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>'>
</asp:TextBox>
<br />
FrontPageQuote:
<asp:TextBox ID="FrontPageQuoteTextBox" runat="server" Text='<%# Bind("FrontPageQuote") %>'>
</asp:TextBox>
<br />
Content:
<asp:TextBox ID="ContentTextBox" runat="server" Text='<%# Bind("Content") %>'>
</asp:TextBox>
<br />
Type:
<asp:TextBox ID="TypeTextBox" runat="server" Text='<%# Bind("Type") %>'>
</asp:TextBox>
<br />
PostDate:
<asp:TextBox ID="PostDateTextBox" runat="server" Text='<%# Bind("PostDate") %>'>
</asp:TextBox>
<br />
ExpDate:
<asp:TextBox ID="ExpDateTextBox" runat="server" Text='<%# Bind("ExpDate") %>'>
</asp:TextBox>
<br />
Thumb:
<asp:TextBox ID="ThumbTextBox" runat="server" Text='<%# Bind("Thumb") %>'>
</asp:TextBox>
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Update">
</asp:LinkButton>
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel">
</asp:LinkButton>
</EditItemTemplate>
<InsertItemTemplate>
LastName:
<asp:TextBox ID="LastNameTextBox0" runat="server" Text='<%# Bind("LastName") %>'>
</asp:TextBox>
<br />
FirstName:
<asp:TextBox ID="FirstNameTextBox0" runat="server" Text='<%# Bind("FirstName") %>'>
</asp:TextBox>
<br />
FrontPageQuote:
<asp:TextBox ID="FrontPageQuoteTextBox0" runat="server" Text='<%# Bind("FrontPageQuote") %>'>
</asp:TextBox>
<br />
Content:
<asp:TextBox ID="ContentTextBox0" runat="server" Text='<%# Bind("Content") %>'>
</asp:TextBox>
<br />
Type:
<asp:TextBox ID="TypeTextBox0" runat="server" Text='<%# Bind("Type") %>'>
</asp:TextBox>
<br />
PostDate:
<asp:TextBox ID="PostDateTextBox0" runat="server" Text='<%# Bind("PostDate") %>'>
</asp:TextBox>
<br />
ExpDate:
<asp:TextBox ID="ExpDateTextBox0" runat="server" Text='<%# Bind("ExpDate") %>'>
</asp:TextBox>
<br />
Thumb:
<asp:TextBox ID="ThumbTextBox0" runat="server" Text='<%# Bind("Thumb") %>'>
</asp:TextBox>
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
Text="Insert">
</asp:LinkButton>
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel">
</asp:LinkButton>
</InsertItemTemplate>
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="5" style="width: 100%">
<tr>
<td valign="top">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Thumb") %>' />
</td>
<td valign="top">
<asp:Label ID="FrontPageQuoteLabel" runat="server" Text='<%# Bind("FrontPageQuote") %>'></asp:Label>
<br />
<a href="<%# "~/hcStudentProfiles.aspx?s=" + Eval("id") %>">Read more about
<%# Eval("FirstName") %>'s experience </a>
</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="StudentProfilesDataSource" runat="server" ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;C:\Documents and Settings\Tony\My Documents\hsdb.mdf&quot;;Integrated Security=True;Connect Timeout=30;User Instance=True"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [StudentProfiles]">
</asp:SqlDataSource>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment