hi im using below code for pagination. i want 1 help,when i click the name(link)it should go to editpage.asp.my question is how can i add links to names? 4 1444
Hi ilayacute,
I presume you are talking about this piece of code: - ' Show field names in the top row
-
Response.Write vbTab & "<tr>" & vbCrLf
-
For I = 0 To rs.Fields.Count - 1
-
Response.Write vbTab & vbTab & "<th>"
-
Response.Write rs.Fields(I).Name
-
Response.Write "</th>" & vbCrLf
-
Next 'I
-
Response.Write vbTab & "</tr>" & vbCrLf
To add a link to these headers change your code to the following: - ' Show field names in the top row
-
Response.Write vbTab & "<tr>" & vbCrLf
-
For I = 0 To rs.Fields.Count - 1
-
Response.Write vbTab & vbTab & "<th>"
-
Response.Write "<a href='editpage.asp'>" & rs.Fields(I).Name & "</a>"
-
Response.Write "</th>" & vbCrLf
-
Next 'I
-
Response.Write vbTab & "</tr>" & vbCrLf
Let me know if this helps,
Dr B
thank u for your response Dr.Bunchman.
but i want to add link to all records in the name field.....ie in the following code - iRecordsShown = 0
-
Do While iRecordsShown < iPageSize And Not rs.EOF
-
Response.Write vbTab & "<tr>" & vbCrLf
-
For I = 0 To rs.Fields.Count - 1
-
Response.Write vbTab & vbTab & "<td>"
-
Response.Write rs.Fields(I)
-
Response.Write "</td>" & vbCrLf
-
Next 'I
-
Response.Write vbTab & "</tr>" & vbCrLf
-
-
' Increment the number of records we've shown
-
iRecordsShown = iRecordsShown + 1
-
' Can't forget to move to the next record!
-
rs.MoveNext
-
Loop
help me....
Just add the anchor tag around the line as I did in my first reply. Like this: - Response.Write "<a href='editpage.asp'>" & rs.Fields(I) & "</a>"
Is that what you wanted?
Dr B
PS Please don't forget to wrap your code in CODE tags - it makes your posts much easier to read - and please read the Posting Guidelines if you have not done so already. Thanks.
thanks for clue sorry for asking again i want link only 'name' that is field(1)
i tried the following but it will create link to all the records in the table.please - <%
-
iRecordsShown = 0
-
Do While iRecordsShown < iPageSize And Not rs.EOF
-
Response.Write vbTab & "<tr>" & vbCrLf
-
For I = 0 To rs.Fields.Count - 1
-
Response.Write vbTab & vbTab & "<td>"
-
Response.Write "<a href='emp_edit.asp'>" & rs.Fields(1) & "</a>"
-
Response.Write rs.Fields(I)
-
Response.Write "</td>" & vbCrLf
-
-
Next 'I
-
Response.Write vbTab & "</tr>" & vbCrLf
-
-
' Increment the number of records we've shown
-
iRecordsShown = iRecordsShown + 1
-
' Can't forget to move to the next record!
-
rs.MoveNext
-
Loop
-
-
' All done - close table
-
Response.Write "</table>" & vbCrLf
-
End If
-
%>
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: ste |
last post by:
Hi there,
Further to my recent posts where I've received excellent help from Rik and
Jerry, I've ended up with an image gallery on my website that displays
images in a table, 3 images per row. This works great and opens all images
in the database when I open the url mywebsite/gallery.php, or I can choose
certain images (by category) by...
|
by: shalini jain |
last post by:
Hi, I want to know how can we do pagination using XSL. There are number of tutorials available on pagination using PHP but nothing with XSL. i am really stuck with my code.
Below is the code that i have written for pagination but it displays the link of all the pages at one go i.e. if i have 8 pages showing 10 results per page than it shows...
|
by: gnawz |
last post by:
I have a pagination function I am using in a file called functions.php as below<? //Pagination functions function getPagingQuery($sql, $itemPerPage = 10) { if (isset($_GET) && (int)$_GET > 0) { $page = (int)$_GET; } else { $page = 1; } // start fetching from this row number $offset = ($page - 1) *...
|
by: ArizonaJohn |
last post by:
Hello,
The code below works great. The user enters a name into an HTML form, the code looks up a table with that name, and then that table is displayed.
I am trying to use pagination with it, and the pagination almost works. The first page of the pagination works fine, but when I click on one of the links for one of the next pages, the...
|
by: kkshansid |
last post by:
this is my search page on which i am getting two parameters from previous page but the problem is that as soon as i click any other next pages my sql query fails as it doesnt get these two parameters
kindly help
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
| |
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |