ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 20th, 2011, 09:38 AM
makumbi makumbi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 6 makumbi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 3 m 49 sec
Reputation Power: 0
Remove colums

Hi members how can i improve my code so that the data displayed doesnt have colums in it .


Code:
<% Option Explicit %>
<html>
<head>
<title>List of Checked Items</title>
</head>
<body>
<%
	Dim Conn,strSQL,objRec,chkDel, myChkBoxes,chkbox,iResultsNum
	Set Conn = Server.Createobject("ADODB.Connection")
		Conn.Open "Driver={SQL Server};Server=kcc2;Database=slis;UID=sula;PWD=sul  a;"
		
		
	%>
<table width="851" border="1">
  <tr>
    <th width="144"> <div align="center">Title </div></th>
    <th width="124"> <div align="center">callno </div></th>
    <th width="166"> <div align="center">Author </div></th>
    <th width="108"> <div align="center">Category </div></th>
    <th width="79"> <div align="center">classe </div></th>
    <th width="120"> <div align="center">subject code </div></th>
    <th width="64"> <div align="center">Tick </div></th>
  </tr>
<%
For Each  chkDel in Request.Form("chkDel")
	strSQL = "select * FROM books WHERE autono = "& chkDel 		 
    Set objRec	= Server.CreateObject("ADODB.RecordSet")
		objRec.open strsql, Conn
	If objRec.EOF Then
		Response.write (" Not found record.")	
	Else
		
		Dim PageLen,PageNo,TotalRecord,TotalPage,No,intID
		PageLen = 2 
		PageNo = Request.QueryString("Page")
		
		'Response.Write("page")
		'response.End()
		
		if PageNo = "" Then PageNo = 1
		TotalRecord = objRec.RecordCount
		objRec.PageSize = PageLen
		TotalPage = objRec.PageCount
		objRec.AbsolutePage = PageNo
		end if 
		
		No=1
		Do While Not objRec.EOF and No <= PageLen

%>
	<tr>
	<td><div align="center"><%=objRec.Fields("Title").Value%></div></td>
	<td><%=objRec.Fields("callno").Value%></td>
	<td><%=objRec.Fields("author").Value%></td>
	<td><div align="center"><%=objRec.Fields("Category").Value%></div></td>
	<td align="right"><%=objRec.Fields("classe").Value%></td>
	<td align="right"><%=objRec.Fields("subjectcode").Value%></td>
    <td align="center"><input type="checkbox" name="chkDel" value="<%=objRec.Fields("autono").Value%>"></td>
  </tr>
  <%
  No = No + 1
		objRec.MoveNext
		Loop
		%>
<%
Next
%>
</table>
	Total : <%=TotalRecord%> Records.  Page <%=PageNo%> (All Page <%=TotalPage%>)
	<% IF Cint(PageNo) > 1 then %>
	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=1"><< First</a> 
	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=PageNo-1%>">< Back</a>
	<% End IF%>
	<% IF Cint(PageNo) < TotalPage Then %>
	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=PageNo+1%>">Next ></a> 
	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=TotalPage%>">Last >></a>
	<% End IF%>
	<br>
	Go to
	<% For intID = 1 To TotalPage%>
	<% if intID = Cint(PageNo) Then%>
	<b><%=intID%></b>
	<%Else%>
	<a href="<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=intID%>"><%=intID%></a>
	<%End IF%>
	<%Next%>
	<%
	

	Conn.Close()
	'Set objExec = Nothing
	Set Conn = Nothing
%>
</body>
</html>

Reply With Quote
  #2  
Old April 20th, 2011, 01:04 PM
Ronster Ronster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2007
Location: Charlotte
Posts: 412 Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 2 h 6 m 13 sec
Reputation Power: 143
You're using a table. Tables have rows and columns. Unless there's something I'm missing, maybe a screenshot of the results would help.

Reply With Quote
  #3  
Old April 21st, 2011, 12:17 AM
makumbi makumbi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 6 makumbi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 3 m 49 sec
Reputation Power: 0
Quote:
Originally Posted by Ronster
You're using a table. Tables have rows and columns. Unless there's something I'm missing, maybe a screenshot of the results would help.


Ronster : What i want is i dont want the data to be displayed showing the colum lines and row lines isnt there a way of hiding them

Reply With Quote
  #4  
Old April 21st, 2011, 11:53 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,234 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 20 m 49 sec
Reputation Power: 4445
View the page source in your browser and figure out what html you need to change. Then visit your asp code and figure out how to modify it to create the desired html in the browser.

If you don't know what html to change you need to ask in the html forum.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #5  
Old April 21st, 2011, 04:54 PM
Ronster Ronster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2007
Location: Charlotte
Posts: 412 Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level)Ronster User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 5 Days 2 h 6 m 13 sec
Reputation Power: 143
Quote:
Originally Posted by makumbi
Ronster : What i want is i dont want the data to be displayed showing the colum lines and row lines isnt there a way of hiding them


You didn't say you wanted the LINES removed, you said you wanted the COLUMNS removed. Big difference.

The lines are called BORDERS. You have the attribute:
Code:
border="1" 

in your table definition. Remove that, no lines.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Remove colums

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap