473,769 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:styleshe et version='1.0'
xmlns:xsl='http ://www.w3.org/1999/xsl/transform'>
<xsl:template match="/">
<style>
.value { width:"25%";fon t-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='treenod es/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='treenod e'>
<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.A dd(tr)
.....

and the output error is:

Exception Details: System.NullRefe renceException: 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.A dd(tr)
Line 156: Else
Source File: C:\Inetpub\DSL\ Patrocinio.PT\P ortalDSL\Deskto pModules\FAQ\As kManag.aspx.vb
Line: 155

Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an
object.]
ASPNetPortal.As kManag.insertNe wNodIntoTable(S tring newID, String
category, String id) in
C:\Inetpub\DSL\ Patrocinio.PT\P ortalDSL\Deskto pModules\FAQ\As kManag.aspx.vb: 155
ASPNetPortal.As kManag.cmd_AddC ategory_Click(O bject sender,
EventArgs e) in C:\Inetpub\DSL\ Patrocinio.PT\P ortalDSL\Deskto pModules\FAQ\As kManag.aspx.vb: 64
System.Web.UI.W ebControls.Link Button.OnClick( EventArgs e)
System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra isePostBackEven t(String
eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
System.Web.UI.P age.ProcessRequ estMain()

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

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

Similar topics

0
3045
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
16259
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 Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet Services Manager."
3
8660
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 get all table names in my database. .... exec ('truncate table ' + @TableName)
2
13926
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 ( weekstart datetime not null primary key, weekend datetime not null )
0
2131
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 working when I include data entry fields to the form: I click on Delete or Edit inside of DataGrid and get this error: "Error: Object doesn't support this property or method" If I remove data entry fields from the form - DataGrid allows to...
4
6719
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 DB Provider for SQL Server SQLState: 42000
1
1879
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 with predefined tags. Some of the tags contain child element. I need to pass the data from the text file i.e the value within the delimiters should be passed to the corresponding tags within the XML file. I have done this through hard code. But i...
2
7053
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, input box for units of service, description of the service and each row has its own dropdown list of unit fees that apply. Each dynamically created row will return 3 values fee1_choice, fee1_unit and fee1_money. Note The above informaton is...
3
2192
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 defined constraint name), item_rate and item_desc. the copmmand is as follows... CODE:
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10047
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.