473,387 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Error getting values from a table created dynamic!

My problem is that i have a xml file that is convert into a table (by
xsl) in a
aspx file, and in vb code i want to get and put some values to the
table. Is the code:
ASPX FILE
<Get the table with the values from the xml file>
.....
<asp:Xml id="myXml" DocumentSource="XMLCat.xml"
TransformSource="Perf.xsl" runat="server"></asp:xml>
.....
XSL File
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/xsl/transform'>
<xsl:template match="/">
<style>
.value { width:"25%";font-family:courier new; font-size:.8em;
white-space=pre;}
</style>
<table border="1" cellspacing="0" cellpadding="3" id="tablexml">
<tr>
<th>id</th>
<th>text</th>
</tr>
<xsl:for-each select='treenodes/treenode'>
<tr>
<td class="value"><em><xsl:value-of
select='@id'/></em></td>
<td class="value"><xsl:value-of select='@text'/></td>
</tr>
<xsl:for-each select='treenode'>
<tr>
<td class="value"><em><xsl:value-of
select='@id'/></em></td>
<td class="value"><xsl:value-of select='@text'/></td>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
VB FILE
.....
tc.Controls.Add(New LiteralControl(newID & "," & category))
tr.Cells.Add(tc)
tableXml.Rows.Add(tr)
.....

and the output error is:

Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.

Source Error:
Line 153: tc.Controls.Add(New LiteralControl(newID &
"," & category))
Line 154: tr.Cells.Add(tc)
Line 155: tableXml.Rows.Add(tr)
Line 156: Else
Source File: C:\Inetpub\DSL\Patrocinio.PT\PortalDSL\DesktopModu les\FAQ\AskManag.aspx.vb
Line: 155

Stack Trace:
[NullReferenceException: Object reference not set to an instance of an
object.]
ASPNetPortal.AskManag.insertNewNodIntoTable(String newID, String
category, String id) in
C:\Inetpub\DSL\Patrocinio.PT\PortalDSL\DesktopModu les\FAQ\AskManag.aspx.vb:155
ASPNetPortal.AskManag.cmd_AddCategory_Click(Object sender,
EventArgs e) in C:\Inetpub\DSL\Patrocinio.PT\PortalDSL\DesktopModu les\FAQ\AskManag.aspx.vb:64
System.Web.UI.WebControls.LinkButton.OnClick(Event Args e)
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()

Thanks for the help that can be give!
Nov 17 '05 #1
0 1657

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
3
by: LineVoltageHalogen | last post by:
Greeting All, I have a stored proc that dynamically truncates all the tables in my databases. I use a cursor and some dynamic sql for this: ...... create cursor Loop through sysobjects and...
2
by: Alicia | last post by:
Does anyone know why I am getting a "Syntax error in Create Table statement". I am using Microsoft Access SQL View to enter it. Any other problems I may run into? CREATE TABLE weeks (...
0
by: Roman | last post by:
I'm trying to create the form which would allow data entry to the Client table, as well as modification and deletion of existing data rows. For some reason the DataGrid part of functionality stops...
4
by: Jack | last post by:
Hi, I am trying to run an example code from a book. However I am getting the following error message: Number: -2147217900 Description: Syntax error or access violation Source: Microsoft OLE...
1
by: Jerry John | last post by:
I am working in ASP.NET with C#. I have a text file which contains datas with delimiters. For example:- MSH|^~\$|DISCHARGE|CLAY COUNTY MEMORIAL|||200502110939| I also have an XML file created...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
3
by: kbcompany | last post by:
Hi I have just started learning oracle. i have created a table with name imp_master and columns item_code with constraint not null, item_name with constraint n1 not null(n1 is user...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.