I am currently using asp.net with c# along with a Master Page. I have been attempting to create a new div for each loop in the while statement in order to customize the design as I desire. Is there a way to achieve this or is there an alternative method that can be implemented solely from my aspx.cs file?
aspx.cs :
protected void Page_Load(object sender, EventArgs e)
{
while (Reader.Read())
{
Response.Write("<div id=test >");
Response.Write(Reader.GetString(3)+" ");
Response.Write(Reader.GetString(10) + "<br />");
Response.Write("<a href='Info.aspx?param=" + Reader.GetString(0) + "' target='_blank'>" + "More..." + "</a>");
Response.Write( "<br />");
Response.Write("");
Response.Write("</div>");
//TextBox1.Text = Reader.GetString(3);
//TextBox2.Text = Reader.GetString(10);
}
}
aspx :
<%@ Page Title="" Language="C#" MasterPageFile="~/MainDesigne.Master" AutoEventWireup="true" CodeBehind="MobilePageRouteDoc.aspx.cs" Inherits="WebApplication2.MobilePageRoteDoc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
</asp:ScriptReference>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
</asp:ScriptReference>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
</asp:ScriptReference>
</Scripts>
</telerik:RadScriptManager>
<link href="Assets/Css/mobile.css" rel="stylesheet" />
<telerik:RadDropDownList ID="RadDropDownList1" runat="server" OnSelectedIndexChanged="RadDropDownList1_SelectedIndexChanged">
</telerik:RadDropDownList>
<div id="test">
</div>
</asp:Content>