Monday 18 October 2010

Accessing a DIV Tag with C#

this problem came the reason for Response.write is add to the c# code also not properly..so, i write the code infront of loop..

below code working properly.

Accessing a DIV Tag with C#


Response.Write("
"); // left:100px; top:100px; width:100px; height:100px; background-color:#ffffff; overflow:auto; scrollbar-face-color : #000000; scrollbar-highlight-color : #000000; scrollbar-3dlight-color : #000000; scrollbar-shadow-color : #000000; scrollbar-darkshadow-color : #000000; scrollbar-track-color : #000000; scrollbar-arrow-color : #000000;>");



for (int i = 0; i <>
{
mydata = InsCarr[i].InsCarrierName; // +"

";

if (ReturnTextbox != null && ReturnTextbox.Trim().Length > 0)
{

//Write to default page, with selection options.
if (MyDiv == null || MyDiv.Trim().Length == 0)
{
Response.Write("
"onmouseout=\"this.style.cursor='pointer';\"" +
"onclick=\"SetTextbox('" +
ReturnTextbox.Trim() + "','" +
mydata + "', '');\">" +
"");


}
else
{

Response.Write("
"onmouseout=\"this.style.cursor='pointer';\"" +
"onclick=\"SetTextbox('" +
ReturnTextbox.Trim() + "','" +
mydata + "', '" +
MyDiv + "');\">" +
"" + mydata + "" +
"
");

}
}
else
{
Response.Write("
" +
mydata + "
");
}

}
Response.Write("
");



}
else
{
return;
}

No comments:

Post a Comment