473,480 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Raising events with a tabstrip

Hi,

I've created a webusercontrol that contains a tabstrip
(Microsoft.Web.UI.WebControls.TabStrip.
I want to raise the event when the selected index of the tabstrip changes.
I wrote the following code :

Public Event TabIndexChanged(ByVal intSelectedIndex As Int16)

Private Sub TabStrip1_onSelectedIndexChange(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TabStrip1.SelectedIndexChange
Dim intSelIndex As Integer = (CType(sender,
Microsoft.Web.UI.WebControls.TabStrip)).SelectedIn dex
RaiseEvent TabIndexChanged(intSelIndex)
End Sub

The problem is that when I check the value of intSelIndex it always is -1.
What did I do wrong?
Thanks in advance.
Nov 19 '05 #1
2 1407
Hi Bart
write ur code inside if page.IsPostBack=false
"Bart Schelkens" wrote:
Hi,

I've created a webusercontrol that contains a tabstrip
(Microsoft.Web.UI.WebControls.TabStrip.
I want to raise the event when the selected index of the tabstrip changes.
I wrote the following code :

Public Event TabIndexChanged(ByVal intSelectedIndex As Int16)

Private Sub TabStrip1_onSelectedIndexChange(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TabStrip1.SelectedIndexChange
Dim intSelIndex As Integer = (CType(sender,
Microsoft.Web.UI.WebControls.TabStrip)).SelectedIn dex
RaiseEvent TabIndexChanged(intSelIndex)
End Sub

The problem is that when I check the value of intSelIndex it always is -1.
What did I do wrong?
Thanks in advance.

Nov 19 '05 #2
Sara,

the tabstrip needs to perform the autopostback or the event isn't triggered.
So I think that's my problem.

But putting the code inside if page.ispostback= false doesn't work either.
"sara" <sa**@discussions.microsoft.com> schreef in bericht
news:1C**********************************@microsof t.com...
Hi Bart
write ur code inside if page.IsPostBack=false
"Bart Schelkens" wrote:
Hi,

I've created a webusercontrol that contains a tabstrip
(Microsoft.Web.UI.WebControls.TabStrip.
I want to raise the event when the selected index of the tabstrip
changes.
I wrote the following code :

Public Event TabIndexChanged(ByVal intSelectedIndex As Int16)

Private Sub TabStrip1_onSelectedIndexChange(ByVal sender As
System.Object,
ByVal e As System.EventArgs) Handles TabStrip1.SelectedIndexChange
Dim intSelIndex As Integer = (CType(sender,
Microsoft.Web.UI.WebControls.TabStrip)).SelectedIn dex
RaiseEvent TabIndexChanged(intSelIndex)
End Sub

The problem is that when I check the value of intSelIndex it always
is -1.
What did I do wrong?
Thanks in advance.

Nov 19 '05 #3

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

Similar topics

4
2064
by: serge calderara | last post by:
Dear all, I have a class wich is raising events as normally it should do. having a form in the same assembly wich is catching those events works fne. Raise events gets catch normaly within the...
6
2836
by: Dan | last post by:
I've created a pocketpc app which has a startup form containing a listview. The form creates an object which in turn creates a System.Threading.Timer. It keeps track of the Timer state using a...
0
1714
by: Greg Park | last post by:
I have many user controls loading into a web page using Page.LoadControl However, I'm unable to figure out how to raise an event when a button is click or a check box is checked. I can have...
1
1110
by: Vannela | last post by:
What are the events associated with TabStrip IE Web Control? Where can i find them? Thank you.
0
1429
by: Joe Campbell | last post by:
I am encountering a problem raising WMI events from an asp.net application. The error received (as captured in the event log) is as follows: System.Runtime.InteropServices.COMException...
4
1576
by: Dave A | last post by:
I am developing a somewhat complex component at the moment and coincidently I am also reading the Framework Design Guidelines book. After reading the section about event raising I have re-written...
2
1676
by: Gman | last post by:
Hi, I have created a usercontrol, a grid control essentially. Within it I have a class: clsGridRecord. I have coded the events such that when a user clicks on the grid, say, the events occur on...
0
1082
by: Ashish | last post by:
HI all, I have been battling with this problem with some time now, now iam out of ideas what to do basically iam planning a tab control in which page developers can define tab abd tabelements on...
1
7135
by: xpnctoc | last post by:
Here's the 30,000-ft. view: I wrapped an asp:Menu control in an ascx control. When I try to dynamically populate the menu in the ascx control, the items appear, but clicking on them fails to trigger...
0
6920
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
7059
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5362
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,...
1
4799
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...
0
3011
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3003
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.