Click here to Skip to main content
12,450,101 members (45,942 online)

.NET Framework

 
QuestionASP.NET Post Textbox After Button Click Pin
xnaLearner9-Dec-12 11:15
memberxnaLearner9-Dec-12 11:15 
AnswerRe: ASP.NET Post Textbox After Button Click Pin
Richard MacCutchan9-Dec-12 21:54
mvpRichard MacCutchan9-Dec-12 21:54 
GeneralRe: ASP.NET Post Textbox After Button Click Pin
xnaLearner10-Dec-12 0:14
memberxnaLearner10-Dec-12 0:14 
Question.netframework Pin
zofi518-Dec-12 4:30
memberzofi518-Dec-12 4:30 
AnswerRe: .netframework Pin
Dave Kreskowiak8-Dec-12 6:37
mvpDave Kreskowiak8-Dec-12 6:37 
AnswerRe: .netframework Pin
Eddy Vluggen8-Dec-12 7:18
memberEddy Vluggen8-Dec-12 7:18 
GeneralRe: .netframework Pin
Kevin Bewley13-Jan-13 23:46
memberKevin Bewley13-Jan-13 23:46 
AnswerRe: .netframework Pin
jibesh11-Dec-12 10:36
memberjibesh11-Dec-12 10:36 
QuestionEnter 3 dates and display order in different VIEW, after click Pin
xnaLearner7-Dec-12 9:52
memberxnaLearner7-Dec-12 9:52 
Question[VB.NET 2008] How to detect if a page of a TabControl is selected (Windows CE) Pin
steve_94966136-Dec-12 21:37
membersteve_94966136-Dec-12 21:37 
AnswerRe: [VB.NET 2008] How to detect if a page of a TabControl is selected (Windows CE) Pin
Zaf Khan10-Dec-12 17:57
memberZaf Khan10-Dec-12 17:57 
GeneralRe: [VB.NET 2008] How to detect if a page of a TabControl is selected (Windows CE) Pin
steve_949661311-Dec-12 21:20
membersteve_949661311-Dec-12 21:20 
GeneralRe: [VB.NET 2008] How to detect if a page of a TabControl is selected (Windows CE) Pin
Zaf Khan12-Dec-12 2:13
memberZaf Khan12-Dec-12 2:13 
Question[VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966135-Dec-12 4:54
membersteve_94966135-Dec-12 4:54 
Hi,
perhaps the subject is not so explanatory but now I try to explain with an example that well represents my problem.
I have a UserControl with two NumericUpDown and a button, then I have a Form1 with a TabControl1 with just one page.
Loading the form I add some pages to the TabControl and I put in every page my UserControl (called "base") in this way:

Public Class Form1
 
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim mypag As TabPage
    Dim myuc As base
 
    For i As Int32 = 0 To 10
      mypag = New TabPage
      myuc = New base
      myuc.Parent = mypag
      mypag.Text = "Pag" & i.ToString
      mypag.Name = "Pag" & i.ToString
      TabControl1.TabPages.Insert(1 + i, mypag)
    Next
 
  End Sub
 
End Class

Than with the button on the page of the TabControl I pass to the next page of the TabControl (and this is done) but I also want to put in the first NumericUpDown of the "next page" the sum of the value of the two NumericUpDown in the current page (the one with the button just pressed) and I don't know how to do this.
The code in the button is:

Public Class base
 
  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim tmp, id As Int32
 
    'sum value
    tmp = NUD1.Value + NUD2.Value  'NUD1 and NUD2 are two NumericUpDown
    'index of the current page
    id = CType(Parent.Parent, TabControl).SelectedIndex
    'go to next page
    CType(Parent.Parent, TabControl).SelectedIndex += 1
 
  End Sub
 
End Class

I don't know how to "poit" to the NumericUpDown of a page different from the one in witch I am, even if I can get the index of that page (I think...)
I tryed something like this:
'this should be the next page
CType(Parent.Parent, TabControl).TabPages(id + 1)
'but this doesn't work:
CType(Parent.Parent, TabControl).TabPages(id + 1).NUD1.Value
'NUD1 is not a member of System.Windows.Forms.TabPage

Can someone give me some advice?

Thanks in advance
AnswerRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen5-Dec-12 5:40
memberEddy Vluggen5-Dec-12 5:40 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966135-Dec-12 20:59
membersteve_94966135-Dec-12 20:59 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen6-Dec-12 2:27
memberEddy Vluggen6-Dec-12 2:27 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966136-Dec-12 3:26
membersteve_94966136-Dec-12 3:26 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen6-Dec-12 5:02
memberEddy Vluggen6-Dec-12 5:02 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966136-Dec-12 21:25
membersteve_94966136-Dec-12 21:25 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen7-Dec-12 1:16
memberEddy Vluggen7-Dec-12 1:16 
QuestionTesting Practices Pin
Andrew Stoute5-Dec-12 4:44
memberAndrew Stoute5-Dec-12 4:44 
AnswerRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 5:36
memberEddy Vluggen5-Dec-12 5:36 
GeneralRe: Testing Practices Pin
Andrew Stoute5-Dec-12 5:45
memberAndrew Stoute5-Dec-12 5:45 
GeneralRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 5:53
memberEddy Vluggen5-Dec-12 5:53 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 6:29
mvpDave Kreskowiak5-Dec-12 6:29 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 6:26
mvpDave Kreskowiak5-Dec-12 6:26 
GeneralRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 6:34
memberEddy Vluggen5-Dec-12 6:34 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 9:55
mvpDave Kreskowiak5-Dec-12 9:55 
GeneralRe: Testing Practices Pin
Eddy Vluggen6-Dec-12 0:08
memberEddy Vluggen6-Dec-12 0:08 
QuestionHow to make a list view and gallerie view on a product page list on some e-commerce Pin
El daniel4-Dec-12 0:19
memberEl daniel4-Dec-12 0:19 
AnswerRe: How to make a list view and gallerie view on a product page list on some e-commerce Pin
Eddy Vluggen4-Dec-12 0:37
memberEddy Vluggen4-Dec-12 0:37 
Questionframework 2.0 and win98 Pin
caradri3-Dec-12 22:37
membercaradri3-Dec-12 22:37 
AnswerRe: framework 2.0 and win98 Pin
Richard MacCutchan3-Dec-12 23:01
mvpRichard MacCutchan3-Dec-12 23:01 
AnswerRe: framework 2.0 and win98 Pin
Eddy Vluggen3-Dec-12 23:04
memberEddy Vluggen3-Dec-12 23:04 
AnswerRe: framework 2.0 and win98 Pin
Pete O'Hanlon3-Dec-12 23:07
protectorPete O'Hanlon3-Dec-12 23:07 
GeneralRe: framework 2.0 and win98 Pin
Eddy Vluggen3-Dec-12 23:31
memberEddy Vluggen3-Dec-12 23:31 
GeneralRe: framework 2.0 and win98 Pin
Pete O'Hanlon3-Dec-12 23:38
protectorPete O'Hanlon3-Dec-12 23:38 
GeneralRe: framework 2.0 and win98 Pin
Eddy Vluggen3-Dec-12 23:43
memberEddy Vluggen3-Dec-12 23:43 
GeneralRe: framework 2.0 and win98 Pin
Pete O'Hanlon3-Dec-12 23:41
protectorPete O'Hanlon3-Dec-12 23:41 
GeneralRe: framework 2.0 and win98 Pin
caradri4-Dec-12 0:25
membercaradri4-Dec-12 0:25 
GeneralRe: framework 2.0 and win98 Pin
Dave Kreskowiak4-Dec-12 4:11
mvpDave Kreskowiak4-Dec-12 4:11 
GeneralRe: framework 2.0 and win98 Pin
caradri4-Dec-12 0:23
membercaradri4-Dec-12 0:23 
GeneralRe: framework 2.0 and win98 Pin
Eddy Vluggen4-Dec-12 0:36
memberEddy Vluggen4-Dec-12 0:36 
GeneralRe: framework 2.0 and win98 Pin
caradri4-Dec-12 1:52
membercaradri4-Dec-12 1:52 
GeneralRe: framework 2.0 and win98 Pin
Pete O'Hanlon4-Dec-12 2:11
protectorPete O'Hanlon4-Dec-12 2:11 
GeneralRe: framework 2.0 and win98 Pin
Eddy Vluggen4-Dec-12 2:56
memberEddy Vluggen4-Dec-12 2:56 
Questionjquery.datePicker not working Pin
xnaLearner3-Dec-12 6:27
memberxnaLearner3-Dec-12 6:27 
AnswerRe: jquery.datePicker not working Pin
Pete O'Hanlon3-Dec-12 6:38
protectorPete O'Hanlon3-Dec-12 6:38 
QuestionOOPS concepts in c# Pin
95003940022-Dec-12 17:09
member95003940022-Dec-12 17:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 24 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid