|
|
How to send/receive XML document using HTTP POST ?
|
Total Hit (10575) |
In my recent project we had a requirement to send a HTTP request in XML document format (e.g. request for a specific order detail). The response was also in XML format. So now question is how would you do that in .Net? Here is the code snippet which you can use to do the same thing.
«code LangId=
....Read More |
Rating
|
|
|
|
|
|
SearchFileInDirTree - Searches a file on a directory tree
|
Total Hit (2858) |
«Code LangId=2»
<System.Runtime.InteropServices.DllImport("imagehlp.dll")> Shared Function _
SearchTreeForFile(ByVal rootPath As String, ByVal inputPathName As String, _
ByVal outputPathBuffer As System.Text.StringBuilder) As Boolean
End Function
' Returns the complete path+name of th
....Read More |
Rating
|
|
|
|
|
|
|
|
|
A For Each statement that visits items in random order
|
Total Hit (2704) |
At times you may need to process elements of an array, a collection, or a dictionary object in random order, for example when sampling a population or (more often) when writing a game, such as a card game. Here's a class that you can use in a For Each statement to randomly process all the elements o
....Read More |
Rating
|
|
|
KeepInRange - Ensure that a value is in a given range
|
Total Hit (2546) |
«Code LangId=2»
' Keep the first argument in the range [lowLimit, highLimit]
' If the value is adjusted, the fourth (optional) argument is set to True
'
' This function works will all basic data types and with objects
' that implement the IComparable interface
Function KeepInRange(ByVal va
....Read More |
Rating
|
|
|
IsValidPath - Validating a system path
|
Total Hit (4589) |
«Code LangId=2»' Validate a system path
' Example:
' MessageBox.Show(IsValidPath("C:\Test\Memo.txt")) ' => True
' MessageBox.Show(IsValidPath("\\RemotePC\Test\Memo.txt")) ' => True
' MessageBox.Show(IsValidPath("C:\Test\Mem|o.txt")) ' => False
Function IsValidPath(ByVal p
....Read More |
Rating
|
|
|
MoveListboxItem - Moving an item of a listbox to another index
|
Total Hit (2558) |
«Code LangId=2»
' Moves an item of a listbox to another index
' If FROMINDEX = -1 then it moves the current highlighted item
'
' Example:
' ' move up the selected item
' MoveListboxItem(ListBox1, -1, ListBox1.SelectedIndex - 1)
' ' move down the selected item
' MoveListboxItem(ListB
....Read More |
Rating
|
|
|
|
|
|
|
|
Using Animated Cursors in .NET
|
Total Hit (1823) |
The Cursor class provided with System.Windows.Forms doesn't support animated cursors - but this tiny class lets you use them interchangably with the existing .NET Framework cursors. Also provided with the code is a technique for drawing cursors directly onto forms and animating on a background threa
....Read More |
Rating
|
|
|
How Do I...Load and use the XmlDocument (W3C DOM)?
|
Total Hit (1004) |
How Do I...Load and use the XmlDocument (W3C DOM)?
This sample illustrates the classes which implement:
«LI»the Document Object Model (Core) Level 1 the World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Specification.
«LI»the Document Object Model Core in the W3C Document Ob
....Read More |
Rating
|
|
|
Cancellable In-Place Edit Popups
|
Total Hit (1632) |
Controls like the ListView and the Outlook ListBar allow you to edit items in place by either double-clicking them or through a context UI feature such as a menu. This article provides a class which helps with the tricky parts of implementing in-place editing, and demonstrates how to use it to creat
....Read More |
Rating
|
|
|
|
How Do I...Create a Publisher Policy Assembly?
|
Total Hit (969) |
A Publisher policy statement describes the compatibility of an assembly issued by the publisher of that shared assembly. See How Do I...Use Version Policy" to see how a publisher's policy statement fits into the overall .NET Framework version policy scheme. Publisher policy is commonly used in servi
....Read More |
Rating
|
|
|
How do I create classes from an XSD schema?
|
Total Hit (995) |
This topic describes how to create classes that can be used to read and write XML that is defined by an XML Schema Description (XSD) file. Once you understand how to generate the classes for your XSD schema, you should read the "How Do I Read and Write Objects From XML?" topic to find out how to act
....Read More |
Rating
|
|
|
How Do I...Read and write binary data?
|
Total Hit (1653) |
This sample illustrates basic binary file input and output using the BinaryReader, BinaryWriter and FileStream classes. A similar topic is presented under the heading How Do I...Create a log file?. Reading and writing binary information enables you to create and use files that are not accessible thr
....Read More |
Rating
|
|
|
ADO.NET: Get Out Parameters from a Stored Procedure
|
Total Hit (550) |
Some stored procedures return values through parameters. When a parameter in a SQL statement or stored procedure is declared as "out", the value of the parameter is returned back to the caller; the value is stored in a parameter in the Parameters collection on the OleDbCommand or SqlCommand objects.
....Read More |
Rating
|
|
|