473,500 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can i link a button and tab control,on click a form is shown in the tab control?

19 New Member
hi
I'm using tab control and i have several buttons that when i click on one of the buttons a tab opens in the tab control and the form is shown .how do i this link?

thanx Stephen
Jul 31 '10 #1
2 1512
Leito
58 New Member
I'm not sure I understand well your request, but you can open a form this way:
Expand|Select|Wrap|Line Numbers
  1. Form1 form = new Form1();
  2. form1.ShowDialog();
  3.  
Then, in your form1_Load() method, you can focus on a tab this way:
Expand|Select|Wrap|Line Numbers
  1. this.tabControl.SelectedTab = this.tabControl.TabPages[tabFocus];
  2. // tabFocus = [0..tabs_count]
  3.  
Does it answer your question?
Aug 2 '10 #2
stephen04
19 New Member
well i don't know exactly if it is what i was searching for...because i didn't quite under stood the last part the one for the tabs.. to explain my scenario better i have button A and i have formApples now when i click on button A formApples will appear in the tab control not in a new window. can this happen?
Aug 2 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1279
by: Framework fan | last post by:
Hello, Has anyone ever seen this before: Say if you are on "webform1.aspx", and there is a link button on this form with the code response.redirect("webform2.aspx") When you click on the...
8
10777
by: simon | last post by:
On code behind file: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Dim ctrl As New LinkButton ctrl.ID =...
2
11598
by: Niclas Lindblom | last post by:
Hi, I have a datagrid with linkbuttons. I would like to catch the click event when a link button has been clicked and use the string from the text value of the link button in a clientside Java...
3
4103
by: Shimon Sim | last post by:
I put linkbutton in a repeater header. I attached event handler in makeup as onclick="btnSort_Click". Made btnSort_Click method public. It doesn't fire if I click on it. I tried to attach it in...
3
2665
by: PJ6 | last post by:
I've added a button to a class inheriting from System.Web.UI.Control and want to handle (pass on) its click event to the page that contains it. Coming from a WinForms background, I thought this...
0
2394
by: prashantnurvi | last post by:
I have programaticaaly created several Link Buttons on my ASPX page, I would like to raise the Click event of these Link buttons, passing in appropriate parameters depending on the Link button I...
0
3391
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I...
5
2406
by: Matt | last post by:
Creating Dynamic aspnet link buttons with in user control, Then i use the control on ever page with wraped with master page. I get the url of the link buttons from xml. Parameter from xml also...
4
2729
by: Amritha.Datta | last post by:
Hi, I want to break the text in the link button into 2 lines. How would this be possible in ASP.NET 2003? Ex: I have a link button "Maintenance Screen" , I want to show that into 2 lines...
0
1062
by: durga2005 | last post by:
Hi In my webgrid I have three columns namely “Type” and “Category” and “code” .But while inserting new record I will not enter “Code” Value since it is automatically generated. When I click the...
0
7018
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
7182
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,...
1
6906
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
7397
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...
1
4923
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
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
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
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
316
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.