Dynamically Create ASP.NET Server Side Controls Using a Repeater Control
$20-25 USD
In Progress
Posted over 13 years ago
$20-25 USD
Paid on delivery
Develop an ASP.NET webpage which contains a repeater control. The repeater control will be bound to as DataSet object and will dynamically write two ASP.NET controls (a LinkButton and an Image). Each control will be dynamically programmed with its attributes, properties and events accordingly in the repeater control.
## Deliverables
Dynamically Create ASP.NET Server Side Controls Using a Repeater Control
?
Develop an ASP.NET webpage which contains a repeater control. The repeater control will be bound to as DataSet object and will dynamically write two ASP.NET controls (a LinkButton and an Image). Each control will be dynamically programmed with its attributes, properties and events accordingly in the repeater control.
?
The creation of the controls should render in a specific location (table/row/td) on the web page. The controls can be created either in the code behind or in the .aspx page itself.
?
Each control will be dynamically named with a sequential number at the end of it (see example below)
?
Below is how the code should create each server controls: Each set of controls should be stacked on each other like a vertical menu on a webpage.
?
<asp:LinkButton id="hypMenuItem01" OnCommand="MenuItem_Click" CommandArgument="1" runat="server"><asp:Image ID="imgMenuItem01" ImageUrl="~/images/demo/common/menu01/[login to view URL]" runat="server" /></asp:LinkButton>
?
<asp:LinkButton id="hypMenuItem02" OnCommand="MenuItem_Click" CommandArgument="2" runat="server"><asp:Image ID="imgMenuItem02" ImageUrl="~/images/demo/common/menu01/[login to view URL]" runat="server" /></asp:LinkButton>
?
Controls will be sequentially numbered and named as follows:
The id of each should be constructed with the ControlName + SortSeq. The Link button id should begin with hyp (id="hypMenuItem02") and the image control id should begin with img (id="imgMenuItem02")
?
ControlName and SortSeq are fields from the dataset
?
The OnCommand and CommandArgujment values of the LinkButtons should be populated with the data from the dataset using the Command and CommandArgument fields accordingly.
?
The ImageUrl property of each image control should be populated from the field Image1aURL in the datasaet.
?
Each control should also include the following attributes accordingly:
?
[login to view URL]("name", "menuitem01")
[login to view URL]("onmouseover", "changeImages('menuitem01', '[login to view URL]'); return true;")
[login to view URL]("onmouseout", "changeImages('menuitem01', '[login to view URL]'); return true;")
?
[login to view URL]("name", "menuitem02")
[login to view URL]("onmouseover", "changeImages('menuitem02', '[login to view URL]'); return true;")
[login to view URL]("onmouseout", "changeImages('menuitem02', '[login to view URL]'); return true;")
?
?
No 3rd party components to be used on this project
?
Below is the database schema required for this project:
?
CREATE TABLE [dbo].[SalesToolDemoMenuItems](
? ? ? ? ? ? ? ? ? ? ? [SalesToolDemoMenuItemGUID] [varchar](50) NOT NULL CONSTRAINT [DF_Table_1_SalesToolDemoMenuItems]? DEFAULT (newid()),
? ? ? ? ? ? ? ? ? ? ? [SalesToolDemoMenuItemID] [nvarchar](50) NULL,
? ? ? ? ? ? ? ? ? ? ? [SalesToolDemoMenuItemName] [nvarchar](100) NOT NULL,
? ? ? ? ? ? ? ? ? ? ? [ControlName] [nvarchar](100) NOT NULL,
? ? ? ? ? ? ? ? ? ? ? [Image1aURL] [nvarchar](100) NULL,
? ? ? ? ? ? ? ? ? ? ? [Image1bURL] [nvarchar](100) NULL,
? ? ? ? ? ? ? ? ? ? ? [Image1cURL] [nvarchar](100) NULL,
? ? ? ? ? ? ? ? ? ? ? [Command] [nvarchar](100) NULL,
? ? ? ? ? ? ? ? ? ? ? [CommandArgument] [nvarchar](50) NULL,
? ? ? ? ? ? ? ? ? ? ? [SortSeq] [int] NOT NULL CONSTRAINT [DF_SalesToolDemoMenuItems_SortSeq]? DEFAULT ((0)),
? ? ? ? ? ? ? ? ? ? ? [Inactive] [bit] NOT NULL CONSTRAINT [DF_SalesToolDemoMenuItems_Inactive]? DEFAULT ((0)),
? ? ? ? ? ? ? ? ? ? ? [CreateDateTime] [datetime] NOT NULL CONSTRAINT [DF_SalesToolDemoMenuItems_CreateDateTime]? DEFAULT (getdate()),
? ? ? ? ? ? ? ? ? ? ? [CreateUserGUID] [varchar](50) NULL,
? ? ? ? ? ? ? ? ? ? ? [ModifyDateTime] [datetime] NOT NULL CONSTRAINT [DF_SalesToolDemoMenuItems_ModifyDateTime]? DEFAULT (getdate()),
? ? ? ? ? ? ? ? ? ? ? [ModifyUserGUID] [varchar](50) NULL,
? ? ? ? ? ? ? ? ? ? ? [GMTDateTime] [datetime] NOT NULL CONSTRAINT [DF_SalesToolDemoMenuItems_GMTDateTime]? DEFAULT (getutcdate())
) ON [PRIMARY]
?
Developer does not need to procide a SQL Database just a dataset with the same fields as above.