473,402 Members | 2,061 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,402 software developers and data experts.

still puzzled

I double click on the dropdownlist box and see the code goes into that
selected_index event of the dropdownlist. And it still not fire up.

Thanks
Nov 18 '05 #1
11 1150
Do you have autopostback set to true?

"Daniel" <so*****@yahoo.com> wrote in message
news:e%***************@tk2msftngp13.phx.gbl...
I double click on the dropdownlist box and see the code goes into that
selected_index event of the dropdownlist. And it still not fire up.

Thanks


Nov 18 '05 #2
See if the Sub Routine is wired to the Event (at the end of the Procedure Declaration you should see a Handles Clause. See if this is pointing to the correct Control

HT

Trevor Benedict
MCSD
Nov 18 '05 #3
Yes, i do

Public Sub cboProReference_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cboProReference.SelectedIndexChanged

......

and i still make the autopostback="true"
OnSelectedIndexChanged="cboProReference_SelectedIn dexChanged"


"Trevor Benedict R" <tr********@yahoo.com> wrote in message
news:0A**********************************@microsof t.com...
See if the Sub Routine is wired to the Event (at the end of the Procedure Declaration you should see a Handles Clause. See if this is pointing to the
correct Control.
HTH

Trevor Benedict R
MCSD

Nov 18 '05 #4
Yes, i do

Public Sub cboProReference_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cboProReference.SelectedIndexChanged

......

and i still make the autopostback="true"
OnSelectedIndexChanged="cboProReference_SelectedIn dexChanged"

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:eS**************@TK2MSFTNGP11.phx.gbl...
Do you have autopostback set to true?

"Daniel" <so*****@yahoo.com> wrote in message
news:e%***************@tk2msftngp13.phx.gbl...
I double click on the dropdownlist box and see the code goes into that
selected_index event of the dropdownlist. And it still not fire up.

Thanks

Nov 18 '05 #5
Hi, Trevor
Do i need to Make this method initialized in the Initialize method of the
code behind page

Thank~

"Trevor Benedict R" <tr********@yahoo.com> wrote in message
news:0A**********************************@microsof t.com...
See if the Sub Routine is wired to the Event (at the end of the Procedure Declaration you should see a Handles Clause. See if this is pointing to the
correct Control.
HTH

Trevor Benedict R
MCSD

Nov 18 '05 #6
you don't need this statement if you are using codebehind/handles
OnSelectedIndexChanged="cboProReference_SelectedIn dexChanged"

or any other statements that reference codebehind methods like that. That is used when you use <script runat="server"> ... </script>

"Daniel" <so*****@yahoo.com> wrote in message news:u3**************@TK2MSFTNGP10.phx.gbl...
Yes, i do

Public Sub cboProReference_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cboProReference.SelectedIndexChanged

.....

and i still make the autopostback="true"
OnSelectedIndexChanged="cboProReference_SelectedIn dexChanged"








"Trevor Benedict R" <tr********@yahoo.com> wrote in message
news:0A**********************************@microsof t.com...
See if the Sub Routine is wired to the Event (at the end of the Procedure

Declaration you should see a Handles Clause. See if this is pointing to the
correct Control.

HTH

Trevor Benedict R
MCSD


Nov 18 '05 #7
Thanks, Raterus
Below is my dropdownlist:
<asp:dropdownlist id="cboProReference" style="Z-INDEX: 107; LEFT: 137px;
POSITION: absolute; TOP: 80px" tabIndex="1" runat="server" Font-Size="8pt"
Font-Names="Tahoma" Width="322px" AutoPostBack="True">
</asp:dropdownlist>
I erase the
OnSelectedIndexChanged="cboProReference_SelectedIn dexChanged".
And the code behind is:
Private Sub cboProReference_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cboProReference.SelectedIndexChanged

txtPCSProjectName.Text = ""

Dim strProtocol As String

strProtocol = cboProReference.SelectedItem.Text

'get the protocol name

Dim anArray() As String

anArray = strProtocol.Split("|"c)

strProtocol = anArray(0)

'go to the database to get the pcs_protocol_ref according to protocol_ref

Dim dl As New WebRandDataLayer

txtPCSProjectName.Text = dl.GetPCSForProtocol(strProtocol)

End Sub

The bad thing is that it is still not fire up. Is anyother possible problem
here?

Thanks again!

"Raterus" <ra*****@spam.org> wrote in message
news:Or*************@TK2MSFTNGP11.phx.gbl...
you don't need this statement if you are using codebehind/handles
OnSelectedIndexChanged="cboProReference_SelectedIn dexChanged"

or any other statements that reference codebehind methods like that. That
is used when you use <script runat="server"> ... </script>

"Daniel" <so*****@yahoo.com> wrote in message
news:u3**************@TK2MSFTNGP10.phx.gbl...
Yes, i do

Public Sub cboProReference_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cboProReference.SelectedIndexChanged

.....

and i still make the autopostback="true"
OnSelectedIndexChanged="cboProReference_SelectedIn dexChanged"


"Trevor Benedict R" <tr********@yahoo.com> wrote in message
news:0A**********************************@microsof t.com...
See if the Sub Routine is wired to the Event (at the end of the Procedur
e Declaration you should see a Handles Clause. See if this is pointing to the correct Control.

HTH

Trevor Benedict R
MCSD


Nov 18 '05 #8
unfortunately it does not go there either!
"Bin Song, MCP" <an*******@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com...
Can you just try the following:

Private Sub cboProReference_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cboProReference.SelectedIndexChanged Response.Write(cboProReference.SelectedItem.Text)
'Comment all other stuffs.
End Sub

Nov 18 '05 #9
I found another place has:

cboProReference.Attributes.Add("onchange", "SetHidProtocol();")

Does it affect the code behind to fire up?

~thanks


"Bin Song, MCP" <an*******@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com...
Can you just try the following:

Private Sub cboProReference_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cboProReference.SelectedIndexChanged Response.Write(cboProReference.SelectedItem.Text)
'Comment all other stuffs.
End Sub

Nov 18 '05 #10
Daniel wrote:
I found another place has:

cboProReference.Attributes.Add("onchange", "SetHidProtocol();")

Does it affect the code behind to fire up?


Yes it does :)

Just comment the line and see for yourself what is generated in the html
on the client. The asp.net engine automaticaly generates some code there
to do the postback. Then add the cboProReference.Attributes.Add("...
line again and see again the generated html. My guess is that you will
see two onchange attributes for the 'select' that is generated on the
client.
Nov 18 '05 #11
Hi Daniel,

I'm viewing the thread and found it is discussing the same problem with
another one titled:
Subject: cannot fire up dropdownlist's SelectedIndexChanged

I've posted my reply in that one and I'd appreciate if you have a look
there. Also, if you feel it convenient that we continue to discuss in that
thread, please feel free to post there. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #12

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

Similar topics

5
by: Maciej Nadolski | last post by:
Hi! I`ve got a simple question but I`m puzzled:( When I create variable: for example $query for query to MySQL its obvieus that I want to use variables. Now should I do something like that: 1)...
8
by: BadOmen | last post by:
I am using Win XP and when I exit my program by clicking the X it locks like it is closed but if I check the Activity Handler( I don't know the right English word for it) it is still there under...
7
by: Robin Becker | last post by:
We've been queried about the randomness of some filenames we're producing. I worked through and seemed to satisfy myself that random is being initialised from the system time in C time(&now)...
0
by: Frank L | last post by:
Greetings, I am somewhat puzzled by a difference that occurs when I compile my web application out of VS.NET or if I compile it through NAnt. The issue is with how the resources get compiled into...
687
by: cody | last post by:
no this is no trollposting and please don't get it wrong but iam very curious why people still use C instead of other languages especially C++. i heard people say C++ is slower than C but i can't...
0
by: alexandre_irrthum | last post by:
Hi there, I am puzzled by the comportment of the line function from the ImageDraw module with regard to the way it draws or does not draw the last pixel of a line. Below I test this function...
29
by: Bryce K. Nielsen | last post by:
Suddenly this week, I've started getting this error message: System.Data.SqlClient.SqlConnection(GetOpenConnection)ExecuteNonQuery requires an open and available Connection. The connection's...
15
by: Lorenzo Stella | last post by:
Hi all, I haven't experienced functional programming very much, but now I'm trying to learn Haskell and I've learned that: 1) in functional programming LISTS are fundmental; 2) any "cycle" in FP...
2
by: darrel | last post by:
Quick background: Our department reveived new PCs a few weeks ago. Alas, due to new security policies, we weren't immediately set up as admins of our own machines, so most of us developers had...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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.