hi guys,
Following is the code for inserting new nodes in an xml file .
Dim fleStream As New FileStream("C:\mailing.xml", FileMode.Append, FileAccess.Write,FileShare.ReadWrite)
Dim stmWriter As New StreamWriter(fleStream)
Dim writer As New XmlTextWriter(stmWriter)
Dim currNode As XmlNode
Dim doc As New XmlDocument
doc.LoadXml(("<XMLFil...
I have simple columns and their respective sums. However, I exclude 1 particular value from each sum, like so
`=Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value))`
based on a value in 1 column as per the following code in my SSRS 2005 app:
Public Shared Function ChangeWord(ByVal s As String) As String
...
I'm developing a VB Web Application in .NET3.5 using Visual Studio 2008.
I'm having difficulty in validating some XML as a string before I add it to a HTML form to post to a 3rd party. I have an XML schema file from the 3rd party to validate against and at this point I'd like the application to perform the validation before each post.
...
So I am looking at some sample code, and I am not sure what to make of this:
Private Shared _instance As PollsProvider = Nothing
Public Shared ReadOnly Property Instance() As PollsProvider
Get
If IsNothing(_instance) Then
_instance = CType(Activator.CreateInstance( _
Type...
We are migrating our applications to VB.Net 2008 from Classic VB and I need to create a base namespace and business layer. My method of approach is going to be to visit our top BA and identify the common areas of our (Fixed Income) company and try to form a decent inheritence model with as much of the code in generics as possible.
What'...
Hi,
I'm trying to create a hook to monitor the current position of the mouse cursor. Nothing important, I just need to count some pixels during interface design and wanted to learn how to create a hook, so I decided to go for a hard way instead of a sane way.
I've found example code which declares the following function:
<DllImport("U...
Hi, I have a website where the user requires to add and remove Headlines from the main page.
The headlines are stored in a database with a column titled 'Display' (true or false) which decides if the headlines appear. I want the user to have the ability to add or remove headlines from the main page, so have created another page which cre...
I been learning basics of generics and it looks like it can really improve the performance of the application.
But, I am not able to see the generic equivalent of Hashtable.
Please share some sample C# code for creating generic hashtable classes. I need this for a demo.
edit:Thanks for the answers.
...
Recently I needed to compare a suggested pattern for IDisposable and object finalization with the auto-generated one we which VS2005/VB.NET provide. We have used the auto-generated one a fair bit, but after looking it the two side by side I had a number of questions about the VB.NET implementation...
For reference, here is the IDE's im...
Hi,
We have a web service solution in VB .Net 2005 that we have started getting an error in. We provide an interface like the following:
Public Interface IBatchTrackerService
Function InsertBatchTracker(ByVal BatchTrackerObject As BatchTracker, ByRef errorNum As Integer, ByRef errorMsg As String) As Integer
End Interface
In ...
I'm trying to access the Count Property on the array of rows returned by the datatables select method, this is after converting the Web Project to 3.5
...
Here's the situation.
When a user is editing a given piece of data, they're allowed to add messages/comments. These are stored as child records in a SQL database. Clicking on the Add Message button brings up a panel (pnlMessage) courtesy of the AJAX ModalPopup Extender. This takes some input and, when the "Send Message" button in the pa...
What types of exceptions should be thrown for invalid or unexpected parameters in .NET? When would I choose one instead of another?
Follow-up:
Which exception would you use if you have a function expecting an integer corresponding to a month and you passed in '42'? Would this fall into the "out of range" category even though it's not ...
Setting CLS compliance for an entire .NET assembly is possible. But how is it actually done? E.g. with Visual Studio 2008?
...
Does automatic software update causes some of the module property not to work? I am really scratching my head over this function that I have posted here. They are basically the same function that reads image logo from the currently executing assembly. Function named "Get2LogoImageStream" is different from "Get1LogoImageStream" by just Cu...
Imports System.Reflection
Public Class Test
Private Field As String
End Class
Module Module1
Sub Main()
Dim field = GetType(Test).GetField("Field", Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Instance)
Dim test = New Test
Dim GetValue = New Func(Of Test, String)(Function(t As Test) fie...
Im trying to add data into a new column I have created in my gridview. I create the column with the code below:
Dim Field As New BoundField
Field.HeaderText = "Cummulative Amount"
Dim Col As DataControlField = Field
Me.GridView1.Columns.Add(Col)
Now I need to go in and add data for the rows below the column. I have seen ppl saying I...
Server Error in '/' Application.
--------------------------------------------------------------------------------
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature ver...
Hi guys,
I am getting following error.
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Description: An unhandled exception occurred during the execution of the ...
hi guys,
I am running windows application in vb.net.I have a xml file named mail.xml in folder named XmlFiles.In default.aspx.vb i have to get the path of mail.xml.What code i hve to write to make it possible?
...