Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Pass value in ASP .net


Pass value in ASP .net

Author
Message
genyou90
genyou90
Forum God
Forum God (508 reputation)Forum God (508 reputation)Forum God (508 reputation)Forum God (508 reputation)Forum God (508 reputation)Forum God (508 reputation)Forum God (508 reputation)Forum God (508 reputation)Forum God (508 reputation)

Group: Forum Members
Posts: 2, Visits: 6
I'm fresh in asp .net, here need some help. Act is jst a basic things, but i the beginner n jst starter to learn, so hope can get help form u all....thanks



The problem tat i hv is passing value to another page.

Example: After i entered some value in the textbox in current page,when i click submit button, the value will pass to target page and show in the textbox at the target page. I have try so many times, it still show empty in the textbox. Have any1 can help me ? Can teach me some easy method to pass the value ? if can,show me some example, i cant understand the tutorial,it jst show some part,not the full set,when i come d part inside,error occured..hope can get help soon..thanks a lot
sonia.sardana
sonia.sardana
Forum God
Forum God (434 reputation)Forum God (434 reputation)Forum God (434 reputation)Forum God (434 reputation)Forum God (434 reputation)Forum God (434 reputation)Forum God (434 reputation)Forum God (434 reputation)Forum God (434 reputation)

Group: Forum Members
Posts: 2, Visits: 4
hi frnds,I m new to the site.I do not find the option from where to post the new thread(Question). Can somebody tell me .Smile
Edited
5/16/2008 by sonia.sardana
Shahzad
Shahzad
Forum God
Forum God (2.9K reputation)Forum God (2.9K reputation)Forum God (2.9K reputation)Forum God (2.9K reputation)Forum God (2.9K reputation)Forum God (2.9K reputation)Forum God (2.9K reputation)Forum God (2.9K reputation)Forum God (2.9K reputation)

Group: Forum Members
Posts: 10, Visits: 149
For passing value

Dim vInputText as String = TextBox1.Text

Response.Redirect("~/Default1.aspx?id=" & VInputText)

On receiving value

Dim vGetInput as String = Request.QueryString("id")

TextBox.Text = VgetInput

In the following lines I am sending you source code from my project. Suppose nodes have been created now user clicks on node and then what happends this written in the following lines.

'On Sending

Protected Sub TreeView2_SelectedNodeChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles TreeView2.SelectedNodeChanged

Dim vPath As String = TreeView2.SelectedValue.ToString

Dim vFile As String = vPath.Substring(vPath.LastIndexOf("/") + 1)

TreeView2.Attributes.Add("onclick", "window.open('Default4.aspx?id=" & vFile & "',null,'height=500, width=700,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no ');")

End Sub

'On Receiving

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim vOpen As String = Request.QueryString("id")

Dim abpos As Int16 = vOpen.IndexOf(".")

Dim Ext As String = vOpen.Substring(abpos + 1, 3)

If Ext = "swf" Then

Response.Redirect("~/Lecture/" & vOpen)

Page.Title = vOpen

ElseIf Ext = "pdf" Then

Response.Redirect("~/Lecture/" & vOpen)

Page.Title = vOpen

End If

End Sub



Shahzad
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search