G
Guest
Hi Can some one please tell me how I re assign a value to a private variable
with a querystring!
I want to do something like this!
Private rowID As Integer = request.querystring(id)
However this doesn't work!
Would really appritiate anyhelp!
Thanks
... Current Code ..
Private rowID As Integer = "1"
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Get Text for Editor
If Not Page.IsPostBack Then
FreeTextBox1.Text = GetDocument()
End If
End Sub 'Page_Load
Public Sub Button_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
UpdateDocument(FreeTextBox1.Text)
End Sub 'Button_Click
Private Function GetDocument() As String
Dim ds As DataSet = GetDataSet(("SELECT * FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
End Function 'GetDocument
with a querystring!
I want to do something like this!
Private rowID As Integer = request.querystring(id)
However this doesn't work!
Would really appritiate anyhelp!
Thanks
... Current Code ..
Private rowID As Integer = "1"
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Get Text for Editor
If Not Page.IsPostBack Then
FreeTextBox1.Text = GetDocument()
End If
End Sub 'Page_Load
Public Sub Button_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
UpdateDocument(FreeTextBox1.Text)
End Sub 'Button_Click
Private Function GetDocument() As String
Dim ds As DataSet = GetDataSet(("SELECT * FROM tblPageContent WHERE
pageID=" + rowID.ToString()))
Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim doc As String = row("content").ToString()
Return doc
End Function 'GetDocument