Thursday, March 29, 2012
POP3 Mail Retrival- Does any one has source code?
I am wondering if anyone has the source code (in C# or VB.net) to retrive
pop emails from the server. Please DO NOT suggest with somesort of component
solution because I can not trust the dlls (sorry for being rude!)
Thanks in advance. Your help is appreciated.
ProdipIs there any source code here that suits your needs?
http://www.gotdotnet.com/community/...aspx?query=pop3
"Prodip Saha" <psaha@.bear.com> wrote in message
news:ObSg2kqHFHA.3588@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I am wondering if anyone has the source code (in C# or VB.net) to retrive
> pop emails from the server. Please DO NOT suggest with somesort of
> component
> solution because I can not trust the dlls (sorry for being rude!)
> Thanks in advance. Your help is appreciated.
> Prodip
>
Thanks, Ken. This will give me the needed materials/helps.
Prodip
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
news:eIqODc1HFHA.2860@.TK2MSFTNGP12.phx.gbl...
> Is there any source code here that suits your needs?
> http://www.gotdotnet.com/community/...aspx?query=pop3
> "Prodip Saha" <psaha@.bear.com> wrote in message
> news:ObSg2kqHFHA.3588@.TK2MSFTNGP14.phx.gbl...
retrive
>
POP3 Mail Retrival- Does any one has source code?
I am wondering if anyone has the source code (in C# or VB.net) to retrive
pop emails from the server. Please DO NOT suggest with somesort of component
solution because I can not trust the dlls (sorry for being rude!)
Thanks in advance. Your help is appreciated.
ProdipIs there any source code here that suits your needs?
http://www.gotdotnet.com/community/...aspx?query=pop3
"Prodip Saha" <psaha@.bear.com> wrote in message
news:ObSg2kqHFHA.3588@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I am wondering if anyone has the source code (in C# or VB.net) to retrive
> pop emails from the server. Please DO NOT suggest with somesort of
> component
> solution because I can not trust the dlls (sorry for being rude!)
> Thanks in advance. Your help is appreciated.
> Prodip
Thanks, Ken. This will give me the needed materials/helps.
Prodip
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
news:eIqODc1HFHA.2860@.TK2MSFTNGP12.phx.gbl...
> Is there any source code here that suits your needs?
> http://www.gotdotnet.com/community/...aspx?query=pop3
> "Prodip Saha" <psaha@.bear.com> wrote in message
> news:ObSg2kqHFHA.3588@.TK2MSFTNGP14.phx.gbl...
> > Hi,
> > I am wondering if anyone has the source code (in C# or VB.net) to
retrive
> > pop emails from the server. Please DO NOT suggest with somesort of
> > component
> > solution because I can not trust the dlls (sorry for being rude!)
> > Thanks in advance. Your help is appreciated.
> > Prodip
POP3 Mail
I need to implement a POP3 mail client as part of my project, everything fine from getting emails to read the attachments.
Problem is whenever I am downloading the messages they are no more in server, so I need to save them in local hard drive or database, is there any best approach to achieve this, or some other alternativePlease someone guide me through, thanks in advance for your help
whenever I am downloading the messages they are no more in server ? What it means? how you download the messages ? Using outlook express ?
Hi Thanks for Reply...
Means that they are deleted after downloading(Reading) from server, it's the default behaviour of pop I hope so.i tried with Gmail and inbox.com and retrieving a mail from custom written class by utilizing System.Net.Sockets class, even we can observe the behaviour using telnet.
So I need to save those emails before they got deleted from server, I posted here to know any better approaches to save and retrieve those emails whenever we need(like .eml files) or any thing better approach to handle with out saving them.
So,i decided to store emails(raw data received from pop3 server) in to (.eml) files using .net built in IO streams,when i open (.eml) file with outlook express,it's reading all content and attachments as it is,problem solved,if anybody need how just let me know.
Thanks..
...great and affordable component called 4ASPNet POP3, which does the trick.http://www.4-asp.net/products/pop3.aspx
POP3 Service
I need to create an application (service) that will be active in the
background all the time and receive mail. I can't use Microsoft Exchange
Server, I have to make my own. Only problem is that I have no idea how to do
it. Does someone know where could I find some examples or how to do it.
Thanks a lot.PhatCat:
POP3 is a protocol to retrieve mail messages from a mail server. Did
you want your service to poll a mailbox and pull down new messages? Or
did you want your service to listen on a port and actually take emails
via SMTP? (http://www.faqs.org/rfcs/rfc821.html)
Scott
http:// mud
On Tue, 12 Apr 2005 16:22:08 +0200, "PhatCat" <www@.www.com> wrote:
>Hi.
>I need to create an application (service) that will be active in the
>background all the time and receive mail. I can't use Microsoft Exchange
>Server, I have to make my own. Only problem is that I have no idea how to d
o
>it. Does someone know where could I find some examples or how to do it.
>Thanks a lot.
>
I want a sevice to listen on a port and take emails
"Scott Allen" <scott@.nospam.odetocode.com> wrote in message
news:v8go511l59p6s84ro5mupprn5b2r45o3o0@.
4ax.com...
> PhatCat:
> POP3 is a protocol to retrieve mail messages from a mail server. Did
> you want your service to poll a mailbox and pull down new messages? Or
> did you want your service to listen on a port and actually take emails
> via SMTP? (http://www.faqs.org/rfcs/rfc821.html)
> --
> Scott
> http:// mud
> On Tue, 12 Apr 2005 16:22:08 +0200, "PhatCat" <www@.www.com> wrote:
>
>
I don't know of any open source SMTP servers in C# to learn from, you
might consider a free open source package like sendmail :
http://www.sendmail.org/
Scott
On Wed, 13 Apr 2005 00:21:51 +0200, "PhatCat" <www@.www.com> wrote:
>I want a sevice to listen on a port and take emails
>"Scott Allen" <scott@.nospam.odetocode.com> wrote in message
> news:v8go511l59p6s84ro5mupprn5b2r45o3o0@.
4ax.com...
>
POP3 Service
I need to create an application (service) that will be active in the
background all the time and receive mail. I can't use Microsoft Exchange
Server, I have to make my own. Only problem is that I have no idea how to do
it. Does someone know where could I find some examples or how to do it.
Thanks a lot.PhatCat:
POP3 is a protocol to retrieve mail messages from a mail server. Did
you want your service to poll a mailbox and pull down new messages? Or
did you want your service to listen on a port and actually take emails
via SMTP? (http://www.faqs.org/rfcs/rfc821.html)
--
Scott
http:// mud
On Tue, 12 Apr 2005 16:22:08 +0200, "PhatCat" <www@.www.com> wrote:
>Hi.
>I need to create an application (service) that will be active in the
>background all the time and receive mail. I can't use Microsoft Exchange
>Server, I have to make my own. Only problem is that I have no idea how to do
>it. Does someone know where could I find some examples or how to do it.
>Thanks a lot.
I want a sevice to listen on a port and take emails
"Scott Allen" <scott@.nospam.odetocode.com> wrote in message
news:v8go511l59p6s84ro5mupprn5b2r45o3o0@.4ax.com...
> PhatCat:
> POP3 is a protocol to retrieve mail messages from a mail server. Did
> you want your service to poll a mailbox and pull down new messages? Or
> did you want your service to listen on a port and actually take emails
> via SMTP? (http://www.faqs.org/rfcs/rfc821.html)
> --
> Scott
> http:// mud
> On Tue, 12 Apr 2005 16:22:08 +0200, "PhatCat" <www@.www.com> wrote:
>>Hi.
>>I need to create an application (service) that will be active in the
>>background all the time and receive mail. I can't use Microsoft Exchange
>>Server, I have to make my own. Only problem is that I have no idea how to
>>do
>>it. Does someone know where could I find some examples or how to do it.
>>Thanks a lot.
>
I don't know of any open source SMTP servers in C# to learn from, you
might consider a free open source package like SendMail :
http://www.sendmail.org/
--
Scott
On Wed, 13 Apr 2005 00:21:51 +0200, "PhatCat" <www@.www.com> wrote:
>I want a sevice to listen on a port and take emails
>"Scott Allen" <scott@.nospam.odetocode.com> wrote in message
>news:v8go511l59p6s84ro5mupprn5b2r45o3o0@.4ax.com...
>> PhatCat:
>>
>> POP3 is a protocol to retrieve mail messages from a mail server. Did
>> you want your service to poll a mailbox and pull down new messages? Or
>> did you want your service to listen on a port and actually take emails
>> via SMTP? (http://www.faqs.org/rfcs/rfc821.html)
>>
>> --
>> Scott
>> http:// mud
>>
>> On Tue, 12 Apr 2005 16:22:08 +0200, "PhatCat" <www@.www.com> wrote:
>>
>>>Hi.
>>>I need to create an application (service) that will be active in the
>>>background all the time and receive mail. I can't use Microsoft Exchange
>>>Server, I have to make my own. Only problem is that I have no idea how to
>>>do
>>>it. Does someone know where could I find some examples or how to do it.
>>>Thanks a lot.
>>>
>
Popping opening a mail client and pass a subject parameter...
Is there a way to pop open a mail client and pass in a text string for the
subject and possibly other parts of a standard mail message? The "mailto:"
attribute of hyplerlink leaves these blank.
Thanks,
Charlieread up on the mailto: link, it does have a &Subject='text'&Body='text'
attribute IIRC
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Charlie@.CBFC" <charle1@.comcast.net> wrote in message
news:eSlBhiR4DHA.1752@.tk2msftngp13.phx.gbl...
> Hi:
> Is there a way to pop open a mail client and pass in a text string for the
> subject and possibly other parts of a standard mail message? The
"mailto:"
> attribute of hyplerlink leaves these blank.
> Thanks,
> Charlie
Saturday, March 24, 2012
populate DropDownList from DB
Could someone tell me how can be populated DropdownList from Data Base. I
use ASP.NET/C#/MS SQL SERVER.
Thanks!
Viktor
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.Victor,
You need to get the database data into a dataset, set the DropdownList
properties DataSource to the dataset name and DataMember to the table name
and call DataBind method.
Eliyahu
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:OMEUyaGdEHA.212@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Could someone tell me how can be populated DropdownList from Data Base. I
> use ASP.NET/C#/MS SQL SERVER.
> Thanks!
> Viktor
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.
>
Thanks for the reply!
Could you add the other code?
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=blek; Password=banderas");
SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
conn);
DataSet ds = new DataSet();
da.Fill (ds,"Table");
DropDownList2.DataSource = ds;
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
DropDownList2.DataMember = "Table";
DataBind (); // or DropDownList2.DataBind ();
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:%23QdEA%23HdEHA.2664@.TK2MSFTNGP09.phx.gbl...
> Thanks for the reply!
> Could you add the other code?
> SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> Catalog=Estate; User ID=blek; Password=banderas");
> SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
> conn);
>
> DataSet ds = new DataSet();
> da.Fill (ds,"Table");
> DropDownList2.DataSource = ds;
>
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
>
>
Hi, Thanks again for the reply! I wrote that but it doesn't work. Could you
check for an error?
Thanks
private void Page_Load(object sender, System.EventArgs e)
{
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=blek; Password=banderas");
SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
conn);
DataSet ds = new DataSet();
da.Fill (ds,"Table");
DropDownList2.DataSource = ds;
DropDownList2.DataMember = "Table";
DropDownList2.DataBind () ;
}
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
see inline
"Viktor Popov" <viketo@.yahoo.com> wrote in message news:O5PJdnIdEHA.3616@.TK2MSFTNGP10.phx.g
bl...
> Hi, Thanks again for the reply! I wrote that but it doesn't work. Could yo
u
> check for an error?
> Thanks
> private void Page_Load(object sender, System.EventArgs e)
> {
> SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> Catalog=Estate; User ID=blek; Password=banderas");
> SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
> conn);
>
> DataSet ds = new DataSet();
> da.Fill (ds,"Table");
> DropDownList2.DataSource = ds;
> DropDownList2.DataMember = "Table";
> DropDownList2.DataBind () ;
>
add the code (with the correct values):
DropDownList2.DataTextField = "<name of column for visible text>";
DropDownList2.DataValueField = "<name of column for internal value>";
> }
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
>
I tryed to do that:
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=blek; Password=banderas");
SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
conn);
conn.Open();
da.SelectCommand.ExecuteReader();
DataSet ds = new DataSet();
da.Fill (ds,"Table");
DropDownList2.DataSource = ds;
DropDownList2.DataMember = "Table";
DropDownList2.DataTextField = "TypeOffer";
DropDownList2.DataValueField = "OfferID";
DropDownList2.DataBind () ;]
}
but it doesn't work.
What could I do?
Thanks!
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
what's the error?
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:OHTu$fJdEHA.1384@.TK2MSFTNGP10.phx.gbl...
> I tryed to do that:
> private void Page_Load(object sender, System.EventArgs e)
> {
> // Put user code to initialize the page here
> SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> Catalog=Estate; User ID=blek; Password=banderas");
> SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer
",
> conn);
> conn.Open();
> da.SelectCommand.ExecuteReader();
> DataSet ds = new DataSet();
> da.Fill (ds,"Table");
> DropDownList2.DataSource = ds;
> DropDownList2.DataMember = "Table";
> DropDownList2.DataTextField = "TypeOffer";
> DropDownList2.DataValueField = "OfferID";
> DropDownList2.DataBind () ;]
> }
> but it doesn't work.
> What could I do?
> Thanks!
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
>
There is no error. When I start the application the DropDownList is empty.
There are no values, no items. My table is full with data
TypeOffer
--
OfferID TypeOffer
1 rent
2 sell
3 change
Do you know what's wrong?
"Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
news:eahN5iJdEHA.2664@.TK2MSFTNGP09.phx.gbl...
> what's the error?
> "Viktor Popov" <viketo@.yahoo.com> wrote in message
> news:OHTu$fJdEHA.1384@.TK2MSFTNGP10.phx.gbl...
blek.TypeOffer
> ",
>
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
Can set a breakpoint after the line with da.Fill (ds,"Table"); and check if
the dataset actually gets any data?
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:%231PE14JdEHA.2544@.TK2MSFTNGP10.phx.gbl...
> There is no error. When I start the application the DropDownList is empty.
> There are no values, no items. My table is full with data
> TypeOffer
> --
> OfferID TypeOffer
> 1 rent
> 2 sell
> 3 change
> Do you know what's wrong?
> "Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
> news:eahN5iJdEHA.2664@.TK2MSFTNGP09.phx.gbl...
> blek.TypeOffer
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
>
populate DropDownList from DB
Could someone tell me how can be populated DropdownList from Data Base. I
use ASP.NET/C#/MS SQL SERVER.
Thanks!
Viktor
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.Victor,
You need to get the database data into a dataset, set the DropdownList
properties DataSource to the dataset name and DataMember to the table name
and call DataBind method.
Eliyahu
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:OMEUyaGdEHA.212@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Could someone tell me how can be populated DropdownList from Data Base. I
> use ASP.NET/C#/MS SQL SERVER.
> Thanks!
> Viktor
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.
Thanks for the reply!
Could you add the other code?
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=blek; Password=banderas");
SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
conn);
DataSet ds = new DataSet();
da.Fill (ds,"Table");
DropDownList2.DataSource = ds;
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
DropDownList2.DataMember = "Table";
DataBind (); // or DropDownList2.DataBind ();
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:%23QdEA%23HdEHA.2664@.TK2MSFTNGP09.phx.gbl...
> Thanks for the reply!
> Could you add the other code?
> SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> Catalog=Estate; User ID=blek; Password=banderas");
> SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
> conn);
>
> DataSet ds = new DataSet();
> da.Fill (ds,"Table");
> DropDownList2.DataSource = ds;
>
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
Hi, Thanks again for the reply! I wrote that but it doesn't work. Could you
check for an error?
Thanks
private void Page_Load(object sender, System.EventArgs e)
{
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=blek; Password=banderas");
SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
conn);
DataSet ds = new DataSet();
da.Fill (ds,"Table");
DropDownList2.DataSource = ds;
DropDownList2.DataMember = "Table";
DropDownList2.DataBind () ;
}
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
see inline
"Viktor Popov" <viketo@.yahoo.com> wrote in message news:O5PJdnIdEHA.3616@.TK2MSFTNGP10.phx.gbl...
> Hi, Thanks again for the reply! I wrote that but it doesn't work. Could you
> check for an error?
> Thanks
> private void Page_Load(object sender, System.EventArgs e)
> {
> SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> Catalog=Estate; User ID=blek; Password=banderas");
> SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
> conn);
>
> DataSet ds = new DataSet();
> da.Fill (ds,"Table");
> DropDownList2.DataSource = ds;
> DropDownList2.DataMember = "Table";
> DropDownList2.DataBind () ;
add the code (with the correct values):
DropDownList2.DataTextField = "<name of column for visible text>";
DropDownList2.DataValueField = "<name of column for internal value>";
> }
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
I tryed to do that:
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=blek; Password=banderas");
SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer ",
conn);
conn.Open();
da.SelectCommand.ExecuteReader();
DataSet ds = new DataSet();
da.Fill (ds,"Table");
DropDownList2.DataSource = ds;
DropDownList2.DataMember = "Table";
DropDownList2.DataTextField = "TypeOffer";
DropDownList2.DataValueField = "OfferID";
DropDownList2.DataBind () ;]
}
but it doesn't work.
What could I do?
Thanks!
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
what's the error?
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:OHTu$fJdEHA.1384@.TK2MSFTNGP10.phx.gbl...
> I tryed to do that:
> private void Page_Load(object sender, System.EventArgs e)
> {
> // Put user code to initialize the page here
> SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> Catalog=Estate; User ID=blek; Password=banderas");
> SqlDataAdapter da = new SqlDataAdapter ("Select * FROM blek.TypeOffer
",
> conn);
> conn.Open();
> da.SelectCommand.ExecuteReader();
> DataSet ds = new DataSet();
> da.Fill (ds,"Table");
> DropDownList2.DataSource = ds;
> DropDownList2.DataMember = "Table";
> DropDownList2.DataTextField = "TypeOffer";
> DropDownList2.DataValueField = "OfferID";
> DropDownList2.DataBind () ;]
> }
> but it doesn't work.
> What could I do?
> Thanks!
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
There is no error. When I start the application the DropDownList is empty.
There are no values, no items. My table is full with data
TypeOffer
-------
OfferID TypeOffer
1 rent
2 sell
3 change
Do you know what's wrong?
"Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
news:eahN5iJdEHA.2664@.TK2MSFTNGP09.phx.gbl...
> what's the error?
> "Viktor Popov" <viketo@.yahoo.com> wrote in message
> news:OHTu$fJdEHA.1384@.TK2MSFTNGP10.phx.gbl...
> > I tryed to do that:
> > private void Page_Load(object sender, System.EventArgs e)
> > {
> > // Put user code to initialize the page here
> > SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> > Catalog=Estate; User ID=blek; Password=banderas");
> > SqlDataAdapter da = new SqlDataAdapter ("Select * FROM
blek.TypeOffer
> ",
> > conn);
> > conn.Open();
> > da.SelectCommand.ExecuteReader();
> > DataSet ds = new DataSet();
> > da.Fill (ds,"Table");
> > DropDownList2.DataSource = ds;
> > DropDownList2.DataMember = "Table";
> > DropDownList2.DataTextField = "TypeOffer";
> > DropDownList2.DataValueField = "OfferID";
> > DropDownList2.DataBind () ;]
> > }
> > but it doesn't work.
> > What could I do?
> > Thanks!
> > --
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
Can set a breakpoint after the line with da.Fill (ds,"Table"); and check if
the dataset actually gets any data?
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:%231PE14JdEHA.2544@.TK2MSFTNGP10.phx.gbl...
> There is no error. When I start the application the DropDownList is empty.
> There are no values, no items. My table is full with data
> TypeOffer
> -------
> OfferID TypeOffer
> 1 rent
> 2 sell
> 3 change
> Do you know what's wrong?
> "Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
> news:eahN5iJdEHA.2664@.TK2MSFTNGP09.phx.gbl...
> > what's the error?
> > "Viktor Popov" <viketo@.yahoo.com> wrote in message
> > news:OHTu$fJdEHA.1384@.TK2MSFTNGP10.phx.gbl...
> > > I tryed to do that:
> > > private void Page_Load(object sender, System.EventArgs e)
> > > {
> > > // Put user code to initialize the page here
> > > > SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> > > Catalog=Estate; User ID=blek; Password=banderas");
> > > SqlDataAdapter da = new SqlDataAdapter ("Select * FROM
> blek.TypeOffer
> > ",
> > > conn);
> > > conn.Open();
> > > da.SelectCommand.ExecuteReader();
> > > DataSet ds = new DataSet();
> > > da.Fill (ds,"Table");
> > > DropDownList2.DataSource = ds;
> > > DropDownList2.DataMember = "Table";
> > > DropDownList2.DataTextField = "TypeOffer";
> > > DropDownList2.DataValueField = "OfferID";
> > > DropDownList2.DataBind () ;]
> > > }
> > > > but it doesn't work.
> > > What could I do?
> > > > Thanks!
> > > > > --
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
> > >
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
It doesn't work...I'm stucked....
My last code is this. When I RUN it there are no errors but the DropDownList
is not populated and the msg.Text=""
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=blek; Password=banderas");
SqlDataAdapter dad = new SqlDataAdapter ("SELECT blek.TypeOffer.OfferID,
blek.TypeOffer.TypeOffer FROM blek.TypeOffer", conn);
DataTable table=new DataTable();
conn.Open();
dad.Fill(table);
conn.Close();
DropDownList2.DataSource=table;
DropDownList2.DataValueField = "OfferID";
DropDownList2.DataTextField = "TypeOffer";
DropDownList2.DataBind ();
msg.Text = table.Rows.Count.ToString();
}
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.
DropDownList2.DataSource=table;
try: DropDownList2.DataSource=table.DefaultView;
"Viktor Popov" <viketo@.yahoo.com> wrote in message
news:uAGYoqKdEHA.1692@.tk2msftngp13.phx.gbl...
> It doesn't work...I'm stucked....
> My last code is this. When I RUN it there are no errors but the
DropDownList
> is not populated and the msg.Text=""
>
> private void Page_Load(object sender, System.EventArgs e)
> {
> // Put user code to initialize the page here
> SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
> Catalog=Estate; User ID=blek; Password=banderas");
> SqlDataAdapter dad = new SqlDataAdapter ("SELECT
blek.TypeOffer.OfferID,
> blek.TypeOffer.TypeOffer FROM blek.TypeOffer", conn);
>
> DataTable table=new DataTable();
> conn.Open();
> dad.Fill(table);
> conn.Close();
> DropDownList2.DataSource=table;
> DropDownList2.DataValueField = "OfferID";
> DropDownList2.DataTextField = "TypeOffer";
> DropDownList2.DataBind ();
> msg.Text = table.Rows.Count.ToString();
> }
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.729 / Virus Database: 484 - Release Date: 27.7.2004 a.