|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CobaltSoftware.TestWebApplication._Default" Trace="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>Search Parameters</h1>
Forename: <asp:TextBox ID="TxtForename" runat="server" Text="Joe" /><br />
Surname: <asp:TextBox ID="TxtSurname" runat="server" Text="Blogs" /><br />
Min Age: <asp:TextBox ID="TxtAge" runat="server" Text="24" /><br />
<asp:Button ID="BttnClicky" runat="server" Text="Clicky" />
<br />
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="SearchEntities"
TypeName="CobaltSoftware.ExampleBusinessLayer.SomedataObject, CobaltSoftware.ExampleBusinessLayer">
<SelectParameters>
<Cobalt:ObjectParameter Name="input" TypeName="CobaltSoftware.ExampleBusinessLayer.SearchParametersEntity, CobaltSoftware.ExampleBusinessLayer" >
<Properties>
<asp:ControlParameter ControlID="TxtForename" name="Forename" />
<asp:ControlParameter ControlID="TxtSurname" name="Surname" />
<asp:ControlParameter ControlID="TxtAge" name="MinAge" />
</Properties>
</Cobalt:ObjectParameter>
</SelectParameters>
</asp:ObjectDataSource>
<asp:Repeater ID="RptResult" runat="server" DataSourceID="ObjectDataSource1">
<HeaderTemplate>
<h1>Some Example Results</h1>
<ul>
</HeaderTemplate>
<ItemTemplate>
<li><%# Container.DataItem.ToString() %></li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
</div>
</form>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Steve Gray is a Senior Developer at a British insurance company, working on a popular aggregator. When he's not writing ASP .NET, it's because there's SQL or WCF to write instead.