473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

looping throught sub

Phi
Hi,

I hope some one could help me. I just started with vb.net and I'm trying
to build a search form for my site.
I'm trying to make a loop for this piece of code (vb.net) but I can't
figure out how to make it work.

Your help is really appreciate.

Thanks..

New guy

<script langauge="vb">

Sub met_1(Sender as Object, e as System.EventArgs)
if drop_a1.selecteditem.text = "name" then
drop_c1.visible="false"
tbx_c1.visible="true"
end if
if drop_a1.selecteditem.text = "country" then
country()
tbx_c1.visible="false"
drop_c1_view()
end if
End Sub

Sub met_2(Sender as Object, e as System.EventArgs)
if drop_a2.selecteditem.text = "name" then
drop_c2.visible="false"
tbx_c2.visible="true"
end if
if drop_a2.selecteditem.text = "country" then
tbx_c2.visible="false"
country()
drop_c2_view()
end if
End Sub

[..........]

Sub met_7(Sender as Object, e as System.EventArgs)
if drop_a7.selecteditem.text = "name" then
drop_c7.visible="false"
tbx_c7.visible="true"
end if
if drop_a7.selecteditem.text = "country" then
tbx_c7.visible="false"
country()
drop_c7_view()
end if
End Sub

</script>
Jul 17 '05 #1
2 2560
Almost everybody here is using VB6 or lower. While you may get a stray
answer to VB.NET questions here, you should ask them in newsgroups devoted
exclusively to .NET programming. Look for newsgroups with the word "dotnet"
in their name.

For the news.devx.com news server, try these

vb.dotnet.discussion
vb.dotnet.technical

For the microsoft news server, try these newsgroups...

microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb

There are some others, but these should get you started.

Rick - MVP


"Phi" <ph*******@hotmail.com(remove)> wrote in message
news:Xn**********************************@194.109. 133.20...
Hi,

I hope some one could help me. I just started with vb.net and I'm trying
to build a search form for my site.
I'm trying to make a loop for this piece of code (vb.net) but I can't
figure out how to make it work.

Your help is really appreciate.

Thanks..

New guy

<script langauge="vb">

Sub met_1(Sender as Object, e as System.EventArgs)
if drop_a1.selecteditem.text = "name" then
drop_c1.visible="false"
tbx_c1.visible="true"
end if
if drop_a1.selecteditem.text = "country" then
country()
tbx_c1.visible="false"
drop_c1_view()
end if
End Sub

Sub met_2(Sender as Object, e as System.EventArgs)
if drop_a2.selecteditem.text = "name" then
drop_c2.visible="false"
tbx_c2.visible="true"
end if
if drop_a2.selecteditem.text = "country" then
tbx_c2.visible="false"
country()
drop_c2_view()
end if
End Sub

[..........]

Sub met_7(Sender as Object, e as System.EventArgs)
if drop_a7.selecteditem.text = "name" then
drop_c7.visible="false"
tbx_c7.visible="true"
end if
if drop_a7.selecteditem.text = "country" then
tbx_c7.visible="false"
country()
drop_c7_view()
end if
End Sub

</script>

Jul 17 '05 #2
Phi
thanks for your reply, I'll give it a try elsewhere..

New Guy
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in
news:U7********************@comcast.com:

Almost everybody here is using VB6 or lower. While you may get a stray
answer to VB.NET questions here, you should ask them in newsgroups
devoted exclusively to .NET programming. Look for newsgroups with the
word "dotnet" in their name.

For the news.devx.com news server, try these

vb.dotnet.discussion
vb.dotnet.technical

For the microsoft news server, try these newsgroups...

microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb

There are some others, but these should get you started.

Rick - MVP


"Phi" <ph*******@hotmail.com(remove)> wrote in message
news:Xn**********************************@194.109. 133.20...
Hi,

I hope some one could help me. I just started with vb.net and I'm
trying to build a search form for my site.
I'm trying to make a loop for this piece of code (vb.net) but I
can't figure out how to make it work.

Your help is really appreciate.

Thanks..

New guy

<script langauge="vb">

Sub met_1(Sender as Object, e as System.EventArgs)
if drop_a1.selecteditem.text = "name" then
drop_c1.visible="false"
tbx_c1.visible="true"
end if
if drop_a1.selecteditem.text = "country" then
country()
tbx_c1.visible="false"
drop_c1_view()
end if
End Sub

Sub met_2(Sender as Object, e as System.EventArgs)
if drop_a2.selecteditem.text = "name" then
drop_c2.visible="false"
tbx_c2.visible="true"
end if
if drop_a2.selecteditem.text = "country" then
tbx_c2.visible="false"
country()
drop_c2_view()
end if
End Sub

[..........]

Sub met_7(Sender as Object, e as System.EventArgs)
if drop_a7.selecteditem.text = "name" then
drop_c7.visible="false"
tbx_c7.visible="true"
end if
if drop_a7.selecteditem.text = "country" then
tbx_c7.visible="false"
country()
drop_c7_view()
end if
End Sub

</script>



Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

45
by: Trevor Best | last post by:
I did a test once using a looping variable, first dimmed as Integer, then as Long. I found the Integer was quicker at looping. I knew this to be true back in the 16 bit days where the CPU's (80286)...
5
by: masood.iqbal | last post by:
My simplistic mind tells me that having local variables within looping constructs is a bad idea. The reason is that these variables are created during the beginning of an iteration and deleted at...
1
by: Nguyen Thanh Danh | last post by:
I'm a student, i try search on Internet but i can't find any sample how to send file throught socket, between 2 computer! Please help me! Thanks!
1
by: jez123456 | last post by:
Hi I have the following code: if (chkMaster.Checked) { dbFile = dbFile.Substring(0,dbFile.LastIndexOf(@"\")+1) + "master.mdb"; compactDatabase(ref testPassword, dbFile, userID, pword, regPath,...
1
by: Diva | last post by:
Hi, I have a data grid in my application. It has 20 rows and I have set the page size as 5. I have a Submit button on my form and when I click on Submit, I need to loop through the rows in the...
4
by: Annie | last post by:
hello guys, I am getting the following error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. What i am trying to do is to loop through...
4
by: roni | last post by:
i dont like to use ocx controlx. is there new dll for vb.net that do the job ? or newer code, to send email throught outlook express.
20
by: Ifoel | last post by:
Hi all, Sorry im beginer in vb. I want making programm looping character or number. Just say i have numbers from 100 to 10000. just sample: Private Sub Timer1_Timer() if check1.value= 1...
5
by: hemant kamble | last post by:
Hi all, Can it is possible to prevnt the user to enter data throught keyboard and allow user to enter data through scaner (barcode scaner). how it's possible. Help me.
0
by: karthikkrishnan | last post by:
Plz help me sir. i have i problem in sending and receiveing sms throught connected Windows mobile in PC
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.