Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2010  |  syntax: HTML  |  size: 1.62 KB  |  hits: 122  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
  2.    CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>
  3.  
  4. <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
  5. </asp:Content>
  6. <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
  7.     <h2>
  8.         Welcome to ASP.NET!
  9.     </h2>
  10.     <p>
  11.         To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">
  12.             www.asp.net</a>.
  13.     </p>
  14.     <p>
  15.         You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;clcid=0x409"
  16.            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.<br />
  17.     </p>
  18.     <br />
  19.     <asp:GridView ID="GridView1" AllowSorting="true" AllowPaging="true" runat="server"
  20.        DataSourceID="SqlDataSource1" AutoGenerateEditButton="true" DataKeyNames="RSSID"
  21.        AutoGenerateColumns="False">
  22.         <Columns>
  23.             <asp:BoundField ReadOnly="true" HeaderText="ID" DataField="RSSID" SortExpression="RSSID" />
  24.             <asp:BoundField HeaderText="URL" DataField="URL" SortExpression="URL" />
  25.             <asp:BoundField HeaderText="Name" DataField="Name" SortExpression="Name" />
  26.         </Columns>
  27.     </asp:GridView>
  28.     <asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="SELECT [RSSID], [URL], [Name] FROM [RSSFEEDS]"
  29.        UpdateCommand="UPDATE [RSSFEEDS] SET [Name] = @Name, [URL] = @URL WHERE [RSSID] = @RSSID"
  30.        ConnectionString="Data Source=MATHEW-PC\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True" />
  31. </asp:Content>