473,320 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Web Form formatting problem

Hello,
I'm using Response.Write to write text dynamically to a form. My
problem is that the text sent to the page is not written at the top of
the page, even if all margins are set to zero. I always have a space
between the top of the frame and the start of the text. I already use
this method with Classic ASP forms using VBScript and I do not have this
problem. Does anybody have an idea on how to solve this issue because
it is very tiresome to have two different formats in the same Web
Application.

Here is a sample of the text I write:
Response.Write("<TABLE BORDER=" + "0" + " CELLSPACING=" + "0" + "
WIDTH=" + "500" + ">");
Response.Write("<TR><TD WIDTH=" + "180" + " VALIGN=" + "top" +
"><BR><FONT FACE=" + "Arial" + " SIZE=" +"4" +"><b>" + "Confirmation" +
"</b><BR><BR><TD></FONT></TR>" );
Response.Write("<TR><TD WIDTH=" + "180" + "><FONT FACE=" + "Verdana,
Arial" + " SIZE=" + "2" + ">Status:</FONT></TD>" + "<TD><FONT FACE=" +
"Verdana, Arial" + " SIZE=" + "2" + ">Transaction Completed
Successfully" + "</FONT></TD></TR>" );
Response.Write( "</TABLE" );
Thank you very much for your ideas.
Pete

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
3 1281
I believe your problem is that you are using response.write within an aspx page, which is usually a no-no when creating an html page.

Realize that the rendered html sent to the browser is probably going to place this table above the <html> tag, which is against any html standard written.

<table>....</table>
<html>

Forget you ever knew ASP, and start fresh and learn how to access this table from a script block or codebehind. ASP.net is nothing like ASP, your best bet is to find tutorials out there that explain the difference, and how best to approach migrating to it.

--Michael

"Pierre Carter" <pc*****@kim.kaba.com> wrote in message news:un**************@TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Response.Write to write text dynamically to a form. My
problem is that the text sent to the page is not written at the top of
the page, even if all margins are set to zero. I always have a space
between the top of the frame and the start of the text. I already use
this method with Classic ASP forms using VBScript and I do not have this
problem. Does anybody have an idea on how to solve this issue because
it is very tiresome to have two different formats in the same Web
Application.

Here is a sample of the text I write:
Response.Write("<TABLE BORDER=" + "0" + " CELLSPACING=" + "0" + "
WIDTH=" + "500" + ">");
Response.Write("<TR><TD WIDTH=" + "180" + " VALIGN=" + "top" +
"><BR><FONT FACE=" + "Arial" + " SIZE=" +"4" +"><b>" + "Confirmation" +
"</b><BR><BR><TD></FONT></TR>" );
Response.Write("<TR><TD WIDTH=" + "180" + "><FONT FACE=" + "Verdana,
Arial" + " SIZE=" + "2" + ">Status:</FONT></TD>" + "<TD><FONT FACE=" +
"Verdana, Arial" + " SIZE=" + "2" + ">Transaction Completed
Successfully" + "</FONT></TD></TR>" );
Response.Write( "</TABLE" );
Thank you very much for your ideas.
Pete

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
You can use this inelegant approach <g>. In your code-behind, write a
Protected Function which emits the HTML you want. In your .aspx page, put a
call to it: <%=MyFunction %> at the place where you want the HTML to appear.

"Pierre Carter" <pc*****@kim.kaba.com> wrote in message
news:un**************@TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Response.Write to write text dynamically to a form. My
problem is that the text sent to the page is not written at the top of
the page, even if all margins are set to zero. I always have a space
between the top of the frame and the start of the text. I already use
this method with Classic ASP forms using VBScript and I do not have this
problem. Does anybody have an idea on how to solve this issue because
it is very tiresome to have two different formats in the same Web
Application.

Here is a sample of the text I write:
Response.Write("<TABLE BORDER=" + "0" + " CELLSPACING=" + "0" + "
WIDTH=" + "500" + ">");
Response.Write("<TR><TD WIDTH=" + "180" + " VALIGN=" + "top" +
"><BR><FONT FACE=" + "Arial" + " SIZE=" +"4" +"><b>" + "Confirmation" +
"</b><BR><BR><TD></FONT></TR>" );
Response.Write("<TR><TD WIDTH=" + "180" + "><FONT FACE=" + "Verdana,
Arial" + " SIZE=" + "2" + ">Status:</FONT></TD>" + "<TD><FONT FACE=" +
"Verdana, Arial" + " SIZE=" + "2" + ">Transaction Completed
Successfully" + "</FONT></TD></TR>" );
Response.Write( "</TABLE" );
Thank you very much for your ideas.
Pete

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3
you could try using an asp:label control and setting the text at runtime

"Rick Spiewak" wrote:
You can use this inelegant approach <g>. In your code-behind, write a
Protected Function which emits the HTML you want. In your .aspx page, put a
call to it: <%=MyFunction %> at the place where you want the HTML to appear.

"Pierre Carter" <pc*****@kim.kaba.com> wrote in message
news:un**************@TK2MSFTNGP10.phx.gbl...
Hello,
I'm using Response.Write to write text dynamically to a form. My
problem is that the text sent to the page is not written at the top of
the page, even if all margins are set to zero. I always have a space
between the top of the frame and the start of the text. I already use
this method with Classic ASP forms using VBScript and I do not have this
problem. Does anybody have an idea on how to solve this issue because
it is very tiresome to have two different formats in the same Web
Application.

Here is a sample of the text I write:
Response.Write("<TABLE BORDER=" + "0" + " CELLSPACING=" + "0" + "
WIDTH=" + "500" + ">");
Response.Write("<TR><TD WIDTH=" + "180" + " VALIGN=" + "top" +
"><BR><FONT FACE=" + "Arial" + " SIZE=" +"4" +"><b>" + "Confirmation" +
"</b><BR><BR><TD></FONT></TR>" );
Response.Write("<TR><TD WIDTH=" + "180" + "><FONT FACE=" + "Verdana,
Arial" + " SIZE=" + "2" + ">Status:</FONT></TD>" + "<TD><FONT FACE=" +
"Verdana, Arial" + " SIZE=" + "2" + ">Transaction Completed
Successfully" + "</FONT></TD></TR>" );
Response.Write( "</TABLE" );
Thank you very much for your ideas.
Pete

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: j.t.w | last post by:
Hi All. I'm having a problem with my Date of Birth textbox. When I open the ..htm file, the "DoB" textbox is flat with a border. All of my other textboxes are sunken and are yellow. When I...
2
by: JK | last post by:
Hi All, I am working a form which is tabular layout (continuous form) which will display multiple records at a time. Each line of record needs to be reflected on the color code to show their...
3
by: Prakash Wadhwani | last post by:
Is there any EASY way to highlight a full row in a continuous form so that as i navigate up & down the table/continuous form using the arrow keys, the entire line (all fields) get highlighted ? ...
5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
2
by: Terry | last post by:
I have cerated a Form, ExamsFrm, which is used to input details of exams taken at several Centres. It dosplays details from StudentTbl and has a SubForm which displays details from ExamsTble. I...
4
by: Randy Harris | last post by:
Strange problem on A2K. A continuous form is getting some sort of strobe effect on several systems that have been upgraded to Windows XP (never saw the problem on Win2K). One of the text boxes is...
3
by: PeteCresswell | last post by:
Users want negative values to have a yellow background. No problem on the subforms where every value is a discreet field, but I can't figure out how to make it happen on a continuous form where...
10
by: Perry van Kuppeveld | last post by:
Hi, I have a problem with formatting a table including text fields wich can contain up to 255 chars. I need a table with 3 columns: - First column 50 % over the with a rowspan of the total...
4
by: sara | last post by:
Hi - I've looked at many posts, and cannot find the answer on this specific problem. I have several fields on a table, which I've defined as "Text", 3 characters, Format Yes/No (I picked up the...
2
by: Filips Benoit | last post by:
Dear All, Access 2003 adp on SQL_server 2005 A continious form showing 1 month based on table 'CALENDAR_MONTH_GRID' and fill with a SP. Fields: Companyname, Day1, day2, etc. The value in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.