Hi,
i know this should be easy but cant get it exactly right.
i have a Datagrid pulling results from a stored proc in database, it
outputs four columns, one of which is an email address column. i am
trying to get all the email addresses to be clickable email links
using the mailto: scenerio but am having trouble with code as im a
newbie.
i have looked for examples but nothing quite fits. As you can see from
code i have been messing with 'ds.Tables(0).C olumns'. Is this the best
way to do it? Where am i going wrong?
All help very much appreciated.
Dim daPhone As New SqlClient.SqlDa taAdapter
daPhone.SelectC ommand = New SqlClient.SqlCo mmand
daPhone.SelectC ommand.Connecti on = con
daPhone.SelectC ommand.CommandT ext =
"TEST_OUTPUT_FI RSTNAME"
daPhone.SelectC ommand.CommandT ype =
CommandType.Sto redProcedure
daPhone.SelectC ommand.Paramete rs.Add(workPara m)
Dim ds As DataSet
ds = New DataSet
daPhone.Fill(ds , "tblPhone")
Dim col As DataColumn
For Each col In ds.Tables(0).Co lumns("email")
lstItems.Items. Add(col.ColumnN ame)
Next
dgPhone.DataSou rce = ds
dgPhone().DataB ind() 3 1265
Hi, Dim col As DataColumn For Each col In ds.Tables(0).Co lumns lstItems.Items. Add(col.ColumnN ame) Next
Ken
----------------
"kieran" <ki********@hot mail.com> wrote in message
news:b3******** *************** ***@posting.goo gle.com... Hi,
i know this should be easy but cant get it exactly right.
i have a Datagrid pulling results from a stored proc in database, it outputs four columns, one of which is an email address column. i am trying to get all the email addresses to be clickable email links using the mailto: scenerio but am having trouble with code as im a newbie.
i have looked for examples but nothing quite fits. As you can see from code i have been messing with 'ds.Tables(0).C olumns'. Is this the best way to do it? Where am i going wrong?
All help very much appreciated. Dim daPhone As New SqlClient.SqlDa taAdapter daPhone.SelectC ommand = New SqlClient.SqlCo mmand daPhone.SelectC ommand.Connecti on = con daPhone.SelectC ommand.CommandT ext = "TEST_OUTPUT_FI RSTNAME" daPhone.SelectC ommand.CommandT ype = CommandType.Sto redProcedure daPhone.SelectC ommand.Paramete rs.Add(workPara m)
Dim ds As DataSet ds = New DataSet daPhone.Fill(ds , "tblPhone")
Dim col As DataColumn For Each col In ds.Tables(0).Co lumns("email") lstItems.Items. Add(col.ColumnN ame) Next
dgPhone.DataSou rce = ds dgPhone().DataB ind()
Hi Ken,
Cheers for reply. i was messing with code to try and see the column
names so the list of items doesnt matter, i should have removed it
from the code. what im trying to do is get the email addresses to be
written as email links. each of the email addresses are in a column
named 'email'.
im sure it should just be a while statement that appends the mailto
part to each entry in the column 'email' but can not get it at all.
any ideas...
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message news:<uF******* *******@TK2MSFT NGP12.phx.gbl>. .. Hi,
Dim col As DataColumn For Each col In ds.Tables(0).Co lumns lstItems.Items. Add(col.ColumnN ame) Next
Ken ---------------- "kieran" <ki********@hot mail.com> wrote in message news:b3******** *************** ***@posting.goo gle.com... Hi,
i know this should be easy but cant get it exactly right.
i have a Datagrid pulling results from a stored proc in database, it outputs four columns, one of which is an email address column. i am trying to get all the email addresses to be clickable email links using the mailto: scenerio but am having trouble with code as im a newbie.
i have looked for examples but nothing quite fits. As you can see from code i have been messing with 'ds.Tables(0).C olumns'. Is this the best way to do it? Where am i going wrong?
All help very much appreciated. Dim daPhone As New SqlClient.SqlDa taAdapter daPhone.SelectC ommand = New SqlClient.SqlCo mmand daPhone.SelectC ommand.Connecti on = con daPhone.SelectC ommand.CommandT ext = "TEST_OUTPUT_FI RSTNAME" daPhone.SelectC ommand.CommandT ype = CommandType.Sto redProcedure daPhone.SelectC ommand.Paramete rs.Add(workPara m)
Dim ds As DataSet ds = New DataSet daPhone.Fill(ds , "tblPhone")
Dim col As DataColumn For Each col In ds.Tables(0).Co lumns("email") lstItems.Items. Add(col.ColumnN ame) Next
dgPhone.DataSou rce = ds dgPhone().DataB ind()
got it. cheers for help. for anyone else whoose looking -
<asp:datagrid AutoGenerateCol umns="False">
<Columns>
<asp:TemplateCo lumn HeaderText="e-Mail">
<itemtemplate >
<a href='mailto:<% # Databinder.Eval (Container, "DataItem.e-Mail") %>'>
<%# Databinder.Eval (Container, "DataItem.e-Mail") %>
</a>
</itemtemplate>
</asp:TemplateCol umn>
</Columns>
</asp:datagrid>
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message news:<uF******* *******@TK2MSFT NGP12.phx.gbl>. .. Hi,
Dim col As DataColumn For Each col In ds.Tables(0).Co lumns lstItems.Items. Add(col.ColumnN ame) Next
Ken ---------------- "kieran" <ki********@hot mail.com> wrote in message news:b3******** *************** ***@posting.goo gle.com... Hi,
i know this should be easy but cant get it exactly right.
i have a Datagrid pulling results from a stored proc in database, it outputs four columns, one of which is an email address column. i am trying to get all the email addresses to be clickable email links using the mailto: scenerio but am having trouble with code as im a newbie.
i have looked for examples but nothing quite fits. As you can see from code i have been messing with 'ds.Tables(0).C olumns'. Is this the best way to do it? Where am i going wrong?
All help very much appreciated. Dim daPhone As New SqlClient.SqlDa taAdapter daPhone.SelectC ommand = New SqlClient.SqlCo mmand daPhone.SelectC ommand.Connecti on = con daPhone.SelectC ommand.CommandT ext = "TEST_OUTPUT_FI RSTNAME" daPhone.SelectC ommand.CommandT ype = CommandType.Sto redProcedure daPhone.SelectC ommand.Paramete rs.Add(workPara m)
Dim ds As DataSet ds = New DataSet daPhone.Fill(ds , "tblPhone")
Dim col As DataColumn For Each col In ds.Tables(0).Co lumns("email") lstItems.Items. Add(col.ColumnN ame) Next
dgPhone.DataSou rce = ds dgPhone().DataB ind() This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jim |
last post by:
I have contact info including email address in MySQL. If I use php to
extract them into online directory, can a spambot harvest the address? or
does the spambot read the raw php code?
I previously used javascript to hide my email addresses but more and more
people are disabling javascripting for security reasons. I need to find a
way to keep my email address from being harvested.
Does encoding the email with Ultimate Mailto (hex and...
|
by: dave |
last post by:
Hello,
I'm creating a site that has several contact email addresses. These are
vlid addresses, i'm wondering if i can use php to alter these addresses so
that spam harvesters can't get them, yet a normal user clicking on them can?
Thanks.
Dave.
|
by: Hoang |
last post by:
anyone know of an algorithm to filter out real email addresses as opposed to
computer generated email addresses? I have been going through past email
archives in order to find friends email address. Unfortunately about 75% of
them are junk addresses or spammer addresses. It's quite obvious when you
look at it and delete it... but you don't want to do it by hand.
|
by: JayB |
last post by:
We sent out an email today to a list of subscribers from our database using
ASP and CDO. For some reason, many people received it twice, including
myself. I checked the database and there were do duplicate records and I
know for sure that I have no other email address forwarding email. I checked
my code and all seems ok. Perhaps someone can take a look at it and see if I
screwed up somewhere? It was sent to over 9,000 email addresses. When...
|
by: Steevo |
last post by:
Any suggestions as to the best programs for cloaking email addresses?
Many thanks
--
Steevo
| |
by: |
last post by:
I have a web page written in asp.net that has multiple datagrids on it that
would need to be exported to Excel. Each of the datagrids would be a subset
of what the datagrid above it was.
Thus far, I've had no luck in finding anything to work reliably. Some of
the files I've saved (using a radio button click event), will open fine in
Excel, others give me an "Unable to open file" message.
Any help appreciated.
|
by: mark |
last post by:
i have datagrids set out as such on a webform with vb behind
datagrid1
datagrid2
datagrid3
datagrid4
datagrid5
datagrid6
datagrid7
|
by: needhelp |
last post by:
Hi there,
I really need some help, everything I've tried, all I've found,
doesn't seem to work.
I have lost an email address which is very important to me. I really
need to contact that person asap.
I'm sure to remember that it begin with "leslie".
Is any of you out there able to run a powerful email extractor, script
or anything else that will provide me a complete list of such
addresses?
Doesn't matter how big it will be, it's really...
|
by: chris |
last post by:
I need to maintain a list of subscribers to an email list for a
"newsletter" that will be sent via a web form probably once a month.
I anticipate low numbers--tens to maybe one hundred subscribers at the
most. Just curious what the best way to code this is. Should I just
loop through the addresses and send one-off emails to each, or is it
better to somehow send to every recipient in one shot? One thing I
would like to avoid in the...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |