Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > still puzzled

Reply
Thread Tools

still puzzled

 
 
Daniel
Guest
Posts: n/a
 
      06-08-2004
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?=
Guest
Posts: n/a
 
      06-08-2004
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
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      06-08-2004
Do you have autopostback set to true?

"Daniel" <(E-Mail Removed)> wrote in message
news:e%(E-Mail Removed)...
>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
>
>


 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      06-08-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      06-08-2004
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]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Do you have autopostback set to true?
>
> "Daniel" <(E-Mail Removed)> wrote in message
> news:e%(E-Mail Removed)...
> >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
> >
> >

>



 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      06-08-2004
Hi, Trevor
Do i need to Make this method initialized in the Initialize method of the
code behind page

Thank~



"Trevor Benedict R" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
Raterus
Guest
Posts: n/a
 
      06-08-2004
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>

 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      06-08-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>



 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      06-08-2004
unfortunately it does not go there either!


"Bin Song, MCP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      06-08-2004
I found another place has:

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

Does it affect the code behind to fire up?

~thanks




"Bin Song, MCP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ItemCommand event not firing from a dynamic user control,feeling puzzled EvelynAnd Ethan ASP .Net 4 01-09-2006 03:12 AM
ItemCommand event not firing from a dynamic user control,feeling puzzled EvelynAnd Ethan ASP .Net 0 10-17-2005 04:00 AM
Puzzled about viewstate error jeff29_b@yahoo.com ASP .Net 5 09-14-2005 12:29 AM
Very Puzzled, Please Help schiefaw ASP .Net 3 07-22-2005 07:03 PM
VHDL: puzzled beginner Mark Andrew VHDL 5 06-30-2004 04:06 AM



Advertisments