473,383 Members | 1,822 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,383 software developers and data experts.

how t write html code in asp

omerbutt
638 512MB
sir i want to use the html tags in the asp page ...i want to ask that if it is same to ..just the way we wirte the break tag in asp.
FOR EG.

response.write("<br>")

but it is not working in the case if i try to make a table in asp the code that i have written is here

Response.Write("<table cellspacing="2" cellpadding="2" width="350" align="Center" valign="top" border="4">")
please if any one could help me do reply :(:(:(
and yes the error that i am recieving is here

Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/sar/UPUForm.asp, line 65, column 36
Response.Write("<table cellspacing="2" cellpadding="2" width="350" align="Center" valign="top" border="4">")
-----------------------------------^
Apr 4 '07 #1
7 15815
shweta123
692 Expert 512MB
Hi,

You can give it like this

<%
Response.write("<html><body><table border=1 width='100%'><tr><td>Name</td></tr></table></body></html>")
%>
Apr 4 '07 #2
omerbutt
638 512MB
Miss
its actually like i am trying to edit a specific record the procedure is that i display those fields from a database on an asp page after clicking on edit it posts the record no of that item on another page through which it displays the record against that record no in a form where we can modify it and then save it
now where i want to display it in a form i just want that part to be written in asp
the rest of the page is in html so you know i cant do that what you have told..... in that case i have to write the whole page in asp tags ...where i have already written the html on the top of the page...other than that if u say i can paste the code here if ya like ....kkk ..and fankssss for the help :) ..fankss aloot :)
Hi,

You can give it like this

<%
Response.write("<html><body><table border=1 width='100%'><tr><td>Name</td></tr></table></body></html>")
%>
Apr 4 '07 #3
aasna
4
hi

you can use the normal html tags in an asp page also. the problem i understood is that u want to display the database details in a tabular format.

try using this

<html>
<body>

<%

' Database connection part

%>

<div align="center">

<table BORDER="1" width="681" bordercolordark="#4682B4" bordercolorlight="#00FFFF" bgcolor="#FFFDE8" height="67" style="border-color: #00FFFF"><colour="FFF5EE">

<tr>

<td width="86" align="center" style="border-color: #4682B4"><b><h3>
<font face="Estrangelo Edessa" color="#000000">RecordNo</font></td>

</tr>

<%

Do While not rsDisplayuser.EOF

%>

<tr>
<td >

<%= rsDisplayuser("RecordNo") %>

</td>
</table>
</body>
</html>

regards
aasna
Apr 4 '07 #4
jhardman
3,406 Expert 2GB
sir i want to use the html tags in the asp page ...i want to ask that if it is same to ..just the way we wirte the break tag in asp.
FOR EG.

response.write("<br>")

but it is not working in the case if i try to make a table in asp the code that i have written is here

Response.Write("<table cellspacing="2" cellpadding="2" width="350" align="Center" valign="top" border="4">")
please if any one could help me do reply :(:(:(
and yes the error that i am recieving is here

Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/sar/UPUForm.asp, line 65, column 36
Response.Write("<table cellspacing="2" cellpadding="2" width="350" align="Center" valign="top" border="4">")
-----------------------------------^
The only problem is the double quotes in the response.write string. For HTML transtional you can leave out the double quotes in most tag attributes
Expand|Select|Wrap|Line Numbers
  1. Response.Write("<table cellspacing=2 cellpadding=2 width=350 align=Center valign=top border=4>")
or use single quotes
Expand|Select|Wrap|Line Numbers
  1. Response.Write("<table cellspacing='2' cellpadding='2' width='350' align='Center' valign='top' border='4'>")
Otherwise the server will interpret it as
Expand|Select|Wrap|Line Numbers
  1. Response.Write("<table cellspacing=" 
followed by a bunch of garbage. or you could replace all of the double quotes with chr(34) but that gets very tedious. Probably the best solution is aasna's post above, but I wanted to let you know you don't need to change your code that much.

Let me know if this helps.

Jared
Apr 5 '07 #5
sank06
7
how do i write dataset,html tags in asp

response.write("<tr><td width='70%'>" <%= rs("question")%> "</td>")
Mar 14 '08 #6
omerbutt
638 512MB
how do i write dataset,html tags in asp

response.write("<tr><td width='70%'>" <%= rs("question")%> "</td>")
try it like this
response.write("<tr>")
response.write("<td width='70%'>" )
response.write(rs.fields("question"))
response.write("</td>")
response.write("</tr>")
[/quote]
Mar 14 '08 #7
jhardman
3,406 Expert 2GB
how do i write dataset,html tags in asp

response.write("<tr><td width='70%'>" <%= rs("question")%> "</td>")
Whenever you get large stretches of HTML, I would consider stopping the vbscript:
Expand|Select|Wrap|Line Numbers
  1. %>
  2. <tr><td width="70%"><%=rs("question")%></td>
  3. <%
However, if I wanted to write it more like you tried, it would look like this:
Expand|Select|Wrap|Line Numbers
  1. response.write "<tr><td width='70%'>" & rs("question") & "</td>"
Let me know if this helps.

Jared
Mar 17 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Arthur Connor | last post by:
Is there a way of extracting the Javascript code from the "normal" HTML code (e.g. similar to CSS code which can be put into a separate file) ? If you offer a solution: can I determine in your...
2
by: cnickl | last post by:
I’m using the usual VisualStudio setup. That is to have a “Code Behind” (somename.aspx.vb) file with all the code and the actual HTML code somename.aspx) separate. I like this setup, but now...
4
by: Eirik Eldorsen | last post by:
Is it possible to clear the generated html ouput on aspx page, and then write something else? Why? :-) I want to only the html code from a panel, and most important no form tags. Why? I'm...
26
by: webrod | last post by:
Hi, I have some php pages with a lot of HTML code. I am looking for a HTML validator tool (like TIDY). TIDY is not good enough with PHP tags (it removes a lot of php code). Do you have any...
4
by: ArrK | last post by:
I want to use a control frame to create and/or modify the content (images and text) of a display frame - all files and images are client side. . When I try to write to the display frame from the...
2
by: pratibharaut | last post by:
Hello friends, I am trying to make XHTML pages with PHP . But when i write the php code it doesnt work. It works for plain XHTML. For run that pages i am using WAP Proof software. The code...
8
by: jld730 | last post by:
I have been given a snippet of HTML code that I am to use Python to write it out. I am somewhat new to Python, and completely new to HTML, so I'm still unclear on what it is I am supposed to be...
1
by: | last post by:
Hi, Thanks for your patience. I got the text displayed in the web browser with the following code: f=StringIO.StringIO() f.write('<html><head><title>data analysis...
0
by: Timothy Grant | last post by:
On Mon, Aug 11, 2008 at 10:05 AM, <anartz@anartz.cjb.netwrote: It looks to me like you are opening the url, but never retrieving the content of the url. I think you may have better luck...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.