Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Thursday, March 29, 2012

pop up windows with img and text from...?

using vb.net, with sql 2000 personal edition.

I'm trying to create a portfolio page, the pages would be divided into years from 2001 ~ 2004 with each page a link of projects that my company has done. when the link is clicked it would open a new window with both image and text.

my question is how should i build this pop up page, with over 90 images i do not want to create individual aspx pop up windows, so if i was to get img and text info where should it be coming from? would sql server or is there was a to put this info in the project page? I haven't a clue, plz help.

ps. if you can point me to an example on the net that would be great..

focusA good place to start may be the following tutorial:
A Robust Image Gallery for ASP.NET
wow thanks NewKid2~

i'm still reading it but its a great example, not only for my project but for my personal use as well, also i love the fact that its in vb.net there should be a page called top 10 everyday examples in vb.net for the noobie in you!

focus
> there should be a page called top 10 everyday examples in vb.net

Well, the same guys have written a bunch of ASP.NET articles, most of them using VB.NET, and all written in an easy-to-understand way.

You can see the entire list of their articles here:
http://aspnet.4guysfromrolla.com

POP3 Service

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.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

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.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.
>>>
>

Monday, March 26, 2012

Populate an array from a sql query?

I think I did something wrong with this. I am trying to create an array of product id's from a database query.


Dim dReader As SqlDataReader
Dim i As Integer = 0
Dim Products(i) As String
Dim strResults As String

conConnection.Open()
Dim cmdCommand As New SqlCommand("SELECT ProductID FROM Products WHERE CategoryID = '4'", conConnection)

dReader = cmdCommand.ExecuteReader()
While dReader.Read
Products(i) = dReader("Subcategory")
i += 1
strResults += dReader("Subcategory")
End While
Label1.Text = strResults 'just to display if I am getting results

conConnection.Close()

I put that StrResults so I can monitor if anything is getting picked up, but nothing happens at all. What did I do wrong?Doing this freehand so might be a little bit off.


Dim myArrayList as new ArrayList

Dim dReader As SqlDataReader

Dim i As Integer = 0

Dim strResults As String

conConnection.Open()

Dim cmdCommand As New SqlCommand("SELECT ProductID FROM Products WHERE CategoryID = '4'", conConnection)

dReader = cmdCommand.ExecuteReader()

While dReader.Read

myArrayList.Add(dReader("Subcategory"))

End While

conConnection.Close()

Dim x as Integer
For x = 0 to myArrayList.Count - 1
labeli.text += myArrayList(x) & " "
Next


Cool, thanks. I also noticed that I have Subcategory as my Datareader field, but CategoryID in my actual query.
 Dim cmdCommand As New SqlCommand("SELECT ProductID FROM Products WHERE CategoryID = '4'", conConnection)

dReader = cmdCommand.ExecuteReader()

While dReader.Read

Products(i) = dReader("Subcategory")

............

What did I do wrong?

-> You forgot to select "Subcategory" in SQL query?
Oh, sorry, didn't see you found it yourself.
Thanks guys. It feels so good when it finally works! :)

Friday, March 16, 2012

populating asp:dropdownlist programmatically

I need to display a drop down list which holds up to 250 listitems.

I'd like to create this programmatically rather than have to hardcode it
into the page.

For example

<asp:DropDownList id="numYears" runat="server" name="numYears">
<asp:ListItem Value="0" Text="0 years" Selected="true" />
<asp:ListItem Value="1" Text="1 year"/>
<asp:ListItem Value="2" Text="2 year"/>
<asp:ListItem Value="2" Text="2 year"/>
<asp:ListItem Value="3" Text etc.......... up to 250 years

Thanks in advance..

Simon AmesHi,

put the DDL declaration at the Page (or create it in code just as you see
better).

<asp:DropDownList ID="ddl1" Runat="server">
</asp:DropDownList
Then say in Page_Load:

= = =
if(!Page.IsPostBack)
{
for(int i=0;i<251;i++)
{
ListItem litem=new ListItem(i.ToString() + " years",i.ToString());
ddl1.Items.Add(litem);
}
ddl1.SelectedIndex =0;
}
= = =

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"amessimon" <amessimon@.hotmail.com> wrote in message
news:e1ZyKV4AEHA.744@.TK2MSFTNGP10.phx.gbl...
I need to display a drop down list which holds up to 250 listitems.

I'd like to create this programmatically rather than have to hardcode it
into the page.

For example

<asp:DropDownList id="numYears" runat="server" name="numYears">
<asp:ListItem Value="0" Text="0 years" Selected="true" />
<asp:ListItem Value="1" Text="1 year"/>
<asp:ListItem Value="2" Text="2 year"/>
<asp:ListItem Value="2" Text="2 year"/>
<asp:ListItem Value="3" Text etc.......... up to 250 years

Thanks in advance..

Simon Ames
Hello Simon
"amessimon" <amessimon@.hotmail.com> schrieb im Newsbeitrag
news:e1ZyKV4AEHA.744@.TK2MSFTNGP10.phx.gbl...
> I need to display a drop down list which holds up to 250 listitems.
> I'd like to create this programmatically rather than have to hardcode it
> into the page.
> For example
> <asp:DropDownList id="numYears" runat="server" name="numYears">
> <asp:ListItem Value="0" Text="0 years" Selected="true" />
> <asp:ListItem Value="1" Text="1 year"/>
> <asp:ListItem Value="2" Text="2 year"/>
> <asp:ListItem Value="2" Text="2 year"/>
> <asp:ListItem Value="3" Text etc.......... up to 250 years

for (int i=0; i<=250; i++)

{

numYears.Items.Add(i.ToString());

}

mfg simon g.