Ok. I'm writing and deleting to an xml file using a dataset. I have a function in my codebehind page that binds a listbox to the dataset that performs the writes/deletes. Everything seems to be working fine except, I cannot get the listbox to update after the xml file is written to.
I've tried to rebind the listbox and a bunch of other things; nothing seems to work. I'm sure this is simple fix but, I cannot seem to figure it out.
I have provided some code below.
Thanks in advance!!!
XML file snippet:
<?xml version="1.0" standalone="yes "?>
<Categories>
<xs:schema id="Categories " xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata">
<xs:element name="Categorie s" msdata:IsDataSe t="true" msdata:UseCurre ntLocale="true" msdata:EnforceC onstraints="Fal se">
<xs:complexType >
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:element name="Category" >
<xs:complexType >
<xs:sequence>
<xs:element name="CategoryV alue" type="xs:string " minOccurs="0" />
<xs:element name="CategoryT ext" type="xs:string " minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<Category>
<CategoryValue> Case Management</CategoryValue>
<CategoryText>C ase Management</CategoryText>
</Category>
2 3828
Can anyone suggest a forum where I could get some help with this issue?
I found some help for this problem! The problem was that I was not reassigning the listbox datasource. I change the protected void LoadCategories( ) to accept a dataset from the add and remove category functions. See code below. Sign in to post your reply or Sign up for a free account.
Similar topics |
by: mathieu cupryk |
last post by:
I have problems with listboxes in the webform2.cs, the textboxes are
working well when I do a click on next.
I am missing something. It works with the textboxes.
Here is the file:
using System;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Data;
using System.Drawing;
|
by: Oscar Thornell |
last post by:
Hi,
I have a relativley large/complex typed dataset that contains 7-8 tables and
some supporting relational tables (lookups) for many-to-many relations. A
good exampel would be a dataset that contained the whole Northwind database
with all tables and relations.
In my business logic I will retrive a populated instance of the dataset and
perform some operations (adding/deleting/updating of rows in various
tables...).
|
by: Reney |
last post by:
I haven't used the VS Studio's drag&drop method to create my connection,
adapters and datasets, but I typed them all. The situation is like this:
There is a listbox with members pulled from the database.(I am using an
access db). The user selects one value from the listbox and clicks on one of
two buttons "ThisWeek" or "LastWeek". The button click events each has its
own SQL statement, pulling datarows from two different tables in the...
|
by: Vijay Balki |
last post by:
I am fetching data in DataSet - myDataSet, from a remote database using a
Web Service in my VB.NET client..Once I fetch it I store the data in XML
file (myXMLFile) using the WriteXML method of the myDataSet. The connection
to the Web Service is closed at this point.
I update this XML file in my application, and when I am ready to send the
data back, I load the XML file back to a DataSet - mySendDataSet, using
ReadXML method.
Now I...
|
by: tony010409020622 |
last post by:
I just spent 4 months taking a dotnet class where i learned very
little. One of the things I did not learn is this: What are the
dotnet equivilents of commands such as:
Adodc1.Recordset.AddNew
Adodc1.Recordset.Update
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.MoveNext
Adodc1.Recordset.Delete
| |
by: erin.sebastian |
last post by:
Hello Everyone,
I have created a small application in vb.net to maintain items in a
database the problem i am having is that once i delete/add/edit an
individual item the changes don't reflect in the listbox that displays
all records.
In my form load i have
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
|
by: WB |
last post by:
I'm just starting out with C# after many years with VB 6.0.
I'm trying to fill a listbox with a list of computer names (almost 100) from
app.config. First, is app.config the place to store and retrieve this large
list?
If so, I'm looking for code to obtain the list of computer names from
app.config, and also an example of how the computer names need to be listed
in app.config.
|
by: Ornette |
last post by:
Hello,
I have a stored procedure which generates some values in the table.
When I use update() how to populate the dataset with theses values ?
For the moment I use output parameter but it just works for 1 row and as the
dataset doesn't have the value I should put it after and the rowstate goes
to "modified"...
Any ideas ?
|
by: Tark Siala |
last post by:
hi
i'm using VS.NET 2005 +SP1 C#, and i connect access database by ADO.NET 2.0.
i'm using Dataset to (insert,update,delete) and in get data i use
(Datareader), but my problem when i do this:
1 - insert data (by dataset).
2- get data (by datareader).
when i run this commands i can't get latest data from database, i get data
before insert!!!
but after few second i can get real data after insert, is this problem from
Dataset or Datareader...
|
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...
|
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,...
| |
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |