Click here to Skip to main content
16,006,001 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralAlgorithm Pin
Jaymahinda20-Apr-05 19:17
Jaymahinda20-Apr-05 19:17 
GeneralRe: Algorithm Pin
Christian Graus20-Apr-05 20:21
protectorChristian Graus20-Apr-05 20:21 
GeneralRe: Algorithm Pin
Anonymous21-Apr-05 6:54
Anonymous21-Apr-05 6:54 
GeneralProgrmming the sound card Pin
Jaymahinda20-Apr-05 19:02
Jaymahinda20-Apr-05 19:02 
GeneralRe: Progrmming the sound card Pin
ndanya21-Apr-05 0:00
ndanya21-Apr-05 0:00 
GeneralAccessing dynamically added textbox Pin
nidhishri20-Apr-05 18:03
nidhishri20-Apr-05 18:03 
GeneralRe: Accessing dynamically added textbox Pin
Christian Graus20-Apr-05 18:35
protectorChristian Graus20-Apr-05 18:35 
GeneralRe: Accessing dynamically added textbox Pin
nidhishri20-Apr-05 19:36
nidhishri20-Apr-05 19:36 
Hi,
Thanks for ur kind reply.
I didnt get u sir.i am new to .net. I followed what u have suggested. i wrote it in Page_Init.I dont understand where i have went wrong. i am sending my pages plz check and tell .


1)Web3.aspx.vb

Imports System
Imports System.Net
Imports System.Net.Cookie
Imports System.Net.CookieCollection
Imports System.Net.CookieContainer
Public Class Web3
Inherits System.Web.UI.Page


#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents a11 As System.Web.UI.WebControls.TextBox
'Some more events for more textboxes
Protected WithEvents slno As System.Web.UI.WebControls.PlaceHolder
Protected WithEvents go1 As System.Web.UI.WebControls.Button
Protected WithEvents go As System.Web.UI.WebControls.Button
Protected WithEvents tt0 As System.Web.UI.HtmlControls.HtmlTable

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object


Dim z1, z2, z3, z4 As New TextBox

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()

Dim s1, s2, s4, s5, s7, s8,s10, s11 As Label
'Dim z, z1 As HtmlInputText
If Page.IsPostBack Then



s1 = New Label
s1.Text = "              "


z1 = New TextBox
z1.EnableViewState = True
z1.Columns = "50"

s2 = New Label
s2.Text = ""



s4 = New Label
s4.Text = "              "

z2 = New TextBox
z2.EnableViewState = True
z2.Columns = "50"

s5 = New Label
s5.Text = ""



s7 = New Label
s7.Text = "              "

z3 = New TextBox
z3.Columns = "50"

s8 = New Label
s8.Text = ""




s10 = New Label
s10.Text = "              "

z4 = New TextBox
z4.Columns = "50"

s11 = New Label
s11.Text = ""




slno.Controls.Add(s1)
slno.Controls.Add(z1)
slno.Controls.Add(s2)



slno.Controls.Add(s4)
slno.Controls.Add(z2)
slno.Controls.Add(s5)


slno.Controls.Add(s7)
' slno.Controls.Add(z3)
slno.Controls.Add(s8)



slno.Controls.Add(s10)
' slno.Controls.Add(z4)
slno.Controls.Add(s11)


'Response.Cookies("v").Value = z.Value
'Response.Cookies("v").Value = DateTime.Now.AddDays(1)

Session("t") = z1.Text
Session("t1") = z2.Text
'Session("t") = ViewState("z2")
'Session("t2") = CType(ViewState(z3.text),String)

End If





End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here


End Sub



Private Sub go1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles go1.Click
Dim s1, s2, s4, s5, s7, s8, s10, s11 As Label

If Page.IsPostBack Then


s1 = New Label
s1.Text = "              "


z1 = New TextBox
z1.EnableViewState = True
z1.Columns = "50"

s2 = New Label
s2.Text = ""


s4 = New Label
s4.Text = "              "

z2 = New TextBox
z2.EnableViewState = True
z2.Columns = "50"

s5 = New Label
s5.Text = ""


s7 = New Label
s7.Text = "              "

z3 = New TextBox
z3.Columns = "50"

s8 = New Label
s8.Text = ""



s10 = New Label
s10.Text = "              "

z4 = New TextBox
z4.Columns = "50"

s11 = New Label
s11.Text = ""


slno.Controls.Add(s1)
slno.Controls.Add(z1)
slno.Controls.Add(s2)



slno.Controls.Add(s4)
slno.Controls.Add(z2)
slno.Controls.Add(s5)


slno.Controls.Add(s7)
' slno.Controls.Add(z3)
slno.Controls.Add(s8)



slno.Controls.Add(s10)
' slno.Controls.Add(z4)
slno.Controls.Add(s11)


'Response.Cookies("v").Value = z1.Value
'Response.Cookies("v").Value = DateTime.Now.AddDays(1)


End If


Session("t2") = z3.Text

End Sub

Private Sub go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles go.Click

Response.Cookies("us").Value = a11.Text
Response.Cookies("us").Value = DateTime.Now.AddDays(1)

Response.Redirect("web4.aspx")


End Sub

Private Sub Page_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.DataBinding

End Sub
End Class

2)Web4.aspx.vb

Imports System
Imports System.Net
Imports System.Net.Cookie
Imports System.Net.CookieCollection
Imports System.Net.CookieContainer
Public Class Web4
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents push As System.Web.UI.WebControls.Button
Protected WithEvents a11 As System.Web.UI.WebControls.TextBox

Protected WithEvents at1 As System.Web.UI.WebControls.TextBox

Protected WithEvents at2 As System.Web.UI.WebControls.TextBox

Protected WithEvents at3 As System.Web.UI.WebControls.TextBox

Protected WithEvents at4 As System.Web.UI.WebControls.TextBox

Protected WithEvents thfff As System.Web.UI.HtmlControls.HtmlTable
Protected WithEvents tt1 As System.Web.UI.HtmlControls.HtmlTable

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

Private Sub push_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles push.Click

a11.Text = Request.Cookies("us").Value

'Dim SessionCookie As New Cookie

'at1.Text = Request.Cookies("v").Value
at1.Text = Session("t")
at2.Text = Session("t1")
' at2.Text = Session("t")
' at3.Text = Session("t1")
' at4.Text = Request.Cookies("v1").Value
' End If

at1.Text = Session("t")
at2.Text = Session("t1")
at3.Text = Session("t2")

End Sub

End Class

Regards,
Shrinidhi.
GeneralRe: Accessing dynamically added textbox Pin
Christian Graus20-Apr-05 19:41
protectorChristian Graus20-Apr-05 19:41 
GeneralRe: Accessing dynamically added textbox Pin
nidhishri20-Apr-05 20:16
nidhishri20-Apr-05 20:16 
GeneralRe: Accessing dynamically added textbox Pin
Christian Graus20-Apr-05 20:19
protectorChristian Graus20-Apr-05 20:19 
GeneralEMAIL AND SMS Pin
aqui_i20-Apr-05 16:47
aqui_i20-Apr-05 16:47 
Generalparallel port Pin
khaldoon198320-Apr-05 14:50
khaldoon198320-Apr-05 14:50 
GeneralRe: parallel port Pin
Anonymous20-Apr-05 15:40
Anonymous20-Apr-05 15:40 
QuestionHow do you print a file? Pin
Idreamer7520-Apr-05 14:25
Idreamer7520-Apr-05 14:25 
AnswerRe: How do you print a file? Pin
Christian Graus20-Apr-05 15:40
protectorChristian Graus20-Apr-05 15:40 
GeneralWriting Activex dll Pin
Adarsh Shah20-Apr-05 11:52
Adarsh Shah20-Apr-05 11:52 
GeneralVB.NET Compatibility Pin
vishalmishra20-Apr-05 11:05
vishalmishra20-Apr-05 11:05 
GeneralRe: VB.NET Compatibility Pin
Dave Kreskowiak20-Apr-05 14:13
mveDave Kreskowiak20-Apr-05 14:13 
GeneralRe: VB.NET Compatibility Pin
vishalmishra21-Apr-05 7:47
vishalmishra21-Apr-05 7:47 
GeneralRe: VB.NET Compatibility Pin
Dave Kreskowiak21-Apr-05 7:56
mveDave Kreskowiak21-Apr-05 7:56 
GeneralRe: VB.NET Compatibility Pin
vishalmishra21-Apr-05 9:13
vishalmishra21-Apr-05 9:13 
GeneralRe: VB.NET Compatibility Pin
Dave Kreskowiak21-Apr-05 9:46
mveDave Kreskowiak21-Apr-05 9:46 
GeneralRe: VB.NET Compatibility Pin
vishalmishra21-Apr-05 10:42
vishalmishra21-Apr-05 10:42 
QuestionHow to pass parameters between projects? Pin
Lisana20-Apr-05 9:00
Lisana20-Apr-05 9:00 

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.