Click here to Skip to main content
16,005,339 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: TextBox's text's lenght! Pin
indian14330-Dec-06 2:21
indian14330-Dec-06 2:21 
QuestionAuthentication Pin
MoeInsairat29-Dec-06 12:13
MoeInsairat29-Dec-06 12:13 
AnswerRe: Authentication Pin
Rojan Gh.29-Dec-06 12:31
professionalRojan Gh.29-Dec-06 12:31 
QuestionHow can I do this more cleanly... Pin
code-frog29-Dec-06 4:57
professionalcode-frog29-Dec-06 4:57 
AnswerRe: How can I do this more cleanly... Pin
Grapes-R-Fun29-Dec-06 5:19
Grapes-R-Fun29-Dec-06 5:19 
GeneralRe: How can I do this more cleanly... Pin
code-frog29-Dec-06 5:27
professionalcode-frog29-Dec-06 5:27 
GeneralRe: How can I do this more cleanly... Pin
Grapes-R-Fun29-Dec-06 5:49
Grapes-R-Fun29-Dec-06 5:49 
GeneralRe: How can I do this more cleanly... Pin
code-frog29-Dec-06 5:56
professionalcode-frog29-Dec-06 5:56 
C#
Here's what I'm trying to do: (I'm omitting a lot of code here and tried to keep it short and sweet.)

protected void Page_Load(object sender, EventArgs e)
{
PageContent _PG = new PageContent();

string tmpHTML = "";

tmpHTML += " <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"table5\">" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td>" + "\r\n";
tmpHTML += " <img border=\"0\" src=\"table_title_recentnews.gif\" width=\"282\" height=\"22\"></td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td background=\"background_recentnews.gif\" valign=\"top\" align=\"left\" style=\"height: 133px\">" + "\r\n";

tmpHTML += _PG.BuildNewsContent();

tmpHTML += " </td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td>" + "\r\n";
tmpHTML += " <img border=\"0\" src=\"spacer_eight_pixels.gif\" width=\"8\" height=\"8\"><br>" + "\r\n";
tmpHTML += " <img border=\"0\" src=\"table_title_upcomingevents.gif\" width=\"282\" height=\"22\"></td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td background=\"background_upcomingevents.gif\" height=\"97\" align=\"center\" valign=\"top\">" + "\r\n";

tmpHTML += _PG.BuildEventContent();

tmpHTML += " </td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " </table>" + "\r\n";

InLineHTML.Text = tmpHTML; //This InLineHTML is an ASP:LITERAL

}
public string BuildNewsContent()
{
string tmpHTML = "";
string _Result = "";
int _DivCounter = 0;
bool _bFirstPass = true;
int tableRow = 6;

while (thisReader.Read())
{
_DivCounter += 1;

tmpHTML += " <div align=\"center\">" + "\r\n";
tmpHTML += " <table border=\"0\" width=\"274\" cellspacing=\"3\" cellpadding=\"0\" id=\"table" + tableRow.ToString() + "\">" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td width=\"7\" valign=\"top\">" + "\r\n";
tmpHTML += " <p align=\"center\">" + "\r\n";
tmpHTML += " <font face=\"Tahoma\">" + "\r\n";
tmpHTML += " <span style=\"font-size: 8pt\">•</span></font></td>" + "\r\n";
tmpHTML += " <td width=\"267\" valign=\"top\">" + "\r\n";
tmpHTML += " <font face=\"Tahoma\" style=\"font-size: 8pt\">" + "\r\n";
tmpHTML += thisReader["DateText"].ToString().Trim() + " - " + thisReader["SummaryText"].ToString().Trim() + "</font>" + "\r\n";
tmpHTML += " <font face=\"Tahoma\" style=\"font-size: 7pt\">" + "\r\n";
tmpHTML += " <u><b><a href=\"" + thisReader["MoreInfoURL"].ToString().Trim() + "\">more info</a></b></u></font></td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " </table>" + "\r\n";

tableRow += 1;
}
for (int i = 1; i < _DivCounter + 1; i++)
{
tmpHTML += "</div>" + "\r\n";
}

_Result = tmpHTML;
return _Result;
}

public string BuildEventContent()
{
string tmpHTML = "";
string _Result = "";
int _DivCounter = 0;
bool _bFirstPass = false;
int tableRow = 14;


while (thisReader.Read())
{
if (_bFirstPass == false)
{
tmpHTML += " <div align=\"center\">";
_DivCounter += 1;
}
else
{
_bFirstPass = false;
}

tmpHTML += " <table border=\"0\" width=\"274\" cellspacing=\"3\" cellpadding=\"0\" id=\"table" + tableRow.ToString() + "\">" + "\r\n";
tmpHTML += " <tr>" + "\r\n";
tmpHTML += " <td width=\"7\" valign=\"top\">" + "\r\n";
tmpHTML += " <p align=\"center\"><font face=\"Tahoma\">" + "\r\n";
tmpHTML += " <span style=\"font-size: 8pt\">•</span></font></td>" + "\r\n";
tmpHTML += " <td width=\"267\" valign=\"top\">" + "\r\n";
tmpHTML += " <font face=\"Tahoma\" style=\"font-size: 8pt\">" + "\r\n";
tmpHTML += thisReader["EventText"].ToString().Trim() + "</font>" + "\r\n";
tmpHTML += " <font face=\"Tahoma\" style=\"font-size: 7pt\">" + "\r\n";
tmpHTML += " <u><b><a href=\"" + thisReader["MoreInfoURL"].ToString().Trim() + "\">more info</a></b></u></font></td>" + "\r\n";
tmpHTML += " </tr>" + "\r\n";
tmpHTML += " </table>" + "\r\n";

tableRow += 1;
}
for (int i = 0; i < _DivCounter; i++)
{
tmpHTML += "</div>" + "\r\n";
}
_Result = tmpHTML;

return _Result;
}
GeneralRe: How can I do this more cleanly... Pin
DavidNohejl29-Dec-06 6:04
DavidNohejl29-Dec-06 6:04 
GeneralRe: How can I do this more cleanly... Pin
code-frog29-Dec-06 6:05
professionalcode-frog29-Dec-06 6:05 
GeneralRe: How can I do this more cleanly... Pin
Grapes-R-Fun29-Dec-06 7:05
Grapes-R-Fun29-Dec-06 7:05 
GeneralYour web site... Pin
Grapes-R-Fun29-Dec-06 7:14
Grapes-R-Fun29-Dec-06 7:14 
QuestionRe: Your web site... Pin
code-frog29-Dec-06 9:00
professionalcode-frog29-Dec-06 9:00 
JokeRe: Your web site... Pin
Grapes-R-Fun29-Dec-06 9:29
Grapes-R-Fun29-Dec-06 9:29 
AnswerRe: How can I do this more cleanly... Pin
DavidNohejl29-Dec-06 5:57
DavidNohejl29-Dec-06 5:57 
GeneralRe: How can I do this more cleanly... Pin
code-frog29-Dec-06 5:59
professionalcode-frog29-Dec-06 5:59 
GeneralRe: How can I do this more cleanly... Pin
DavidNohejl29-Dec-06 6:16
DavidNohejl29-Dec-06 6:16 
GeneralRe: How can I do this more cleanly... Pin
DavidNohejl29-Dec-06 9:57
DavidNohejl29-Dec-06 9:57 
GeneralOff Topic Pin
code-frog29-Dec-06 6:02
professionalcode-frog29-Dec-06 6:02 
AnswerRe: How can I do this more cleanly... Pin
Jon Sagara29-Dec-06 13:59
Jon Sagara29-Dec-06 13:59 
Questionloging using httpwebRequest problem Pin
kimo_23eg29-Dec-06 4:52
kimo_23eg29-Dec-06 4:52 
Questionproblem while posting back Pin
Harikrk29-Dec-06 2:39
Harikrk29-Dec-06 2:39 
AnswerRe: problem while posting back Pin
Eduard Keilholz29-Dec-06 3:45
Eduard Keilholz29-Dec-06 3:45 
Questionproxy website Pin
sanki77929-Dec-06 1:48
sanki77929-Dec-06 1:48 
QuestionFile Download, urgetn plzzzzzzz Pin
Exelioindia29-Dec-06 1:22
Exelioindia29-Dec-06 1:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.