Similar Threads:
1.Reassign value to private
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
2.Value in DataTable not changing when new value assigned
VS2005, C#, Win CE 5.
I have a very strange problem which must have a simple answer. I am new to
.NET.
I am reading a simple XML file into a DataSet (1 table, 5 rows, 2 string
fields per row).
This works ok, I can see the data in the debugger QuickWatch window.
I want to change the value of a string field in the DataSet table currently
set to "123":
MyDataTable.Rows[2].ItemArray[1] = "xyz"
It does not change! It is still "123" immediately after this line and no
exception.
The RowState before and after this line is "Unchanged"
How can this be?
The DataSet is not read only (and I assume if it was, then an exception
would be generated when trying to change the value).
Any help extremely welcome.
John.
3.Error assigning value to WMP URL attribute value...
Using VB.NET 2003,
I get the following error when I assign a value to my WMP player's URL
attribute:
player.URL = "C:\Audio\..\Content_IRB\Audio\Audio_IRB.0.wav"
Err Object contents
Description: "Exception from HRESULT: 0xC00D132B."
Erl: 0
HelpContext: 0
HelpFile: ""
LastDllError: 0
Number: -1072884949
Source: "Interop.WMPLib"
Note that the above URL contains a relative path "..\" in the address... it
seems taht this may contribute to the problem because URL's w/no relative
addresses work fine. Problem is that I need to use a relative path in this
situation...
Is this a known bug in the WMP? Anyone have any background or further
information?
Thanks for your atention to this matter...
hzgt9b
4.Cannot dynamically assign a BackColor to a datalist
I need to dynamically assign a datalist attribute upon a helper
function receiving data from a querystring. If a user picks a certain
region, i need the datalist to display its back color, or any of its
other objects , as a certain color or css style
<HeaderStyle BackColor="<%= ssponcont %>"> </HeaderStyle>
...doesnot work as a Parser error renders: Content ('<HeaderStyle
BackColor=') does not match any properties within a
'System.Web.UI.WebControls.DataList', make sure it is well-formed
5.Setting up a datalist control - Item_DataBound for a datalist in a datalist
I have a multi-level datalist setup:
DataList1
DataList2
MyGrid
I have columns explicitly defined for the grid in the html.
Sometimes, On the initial Load() of the Page, I want to add extra columns to
the datagrid - for all records.
I tried getting a reference to the datagrid like this:
foreach(Control ctrl in this.DataList1.Controls)
{
if (ctrl.ID == "DataList2")
{
DataList2 = (DataList) ctrl;
break;
}
}
DataGrid MyGrid;
foreach(Control ctrl in dlstClasses.Controls)
{
if (ctrl.ID == "MyGrid")
{
MyGrid= (DataGrid) ctrl;
break;
}
}
But the inner DataList2 isn't found in the controls set of DataList1, and so
MyGrid isn't found inside DataList2, of course.
So how do I make those changes to the datagrid? Help?
6. basic: should you reassign parameters, or use them without renaming/reassigning?
7. problem assigning value to struct member in for each
8. Problem assigning selectedItem.Value to a dropdownlist filled with OnItemDataBound