Does anyone have recommendations on tools to use to convert an VB.NET ASP.NET Web Application Project into C#? The majority of the conversion tools do not support converting ASP.NET-based projects. Even the VBConversions tool (http://www.vbconversions.net) only converts the code-behind, but leaves all the VB.NET code snippets in the actu...
Possible Duplicate:
string.IsNullOrEmpty() vs string.NotNullOrEmpty()
Can someone explain to me why in .NET I would write String.IsNullOrEmpty(str) instead of str.IsNullOrEmpty()? There must be a logical reason but I don't know it.
It sounds like you guys are saying
You can't call methods from objects that are null in C#/.NET...
I have an application in VB/C# .NET which needs to interact with a third party API, but I would like to interface it out so I can use a mock API for testing purposes. Here are example API calls I would use in code:
RelayClient.AuthenticateUser(username, password, request, sessionID)
RelayClient.GetUserInfo(sessionID)
A few problems I ...
i have a URL lets say .
some time i need to send HTTP and some time i need to send it to HTTPS
for that i created a enum:
Private _protocol As Protocol
Enum Protocol
HTTP
HTTPS
End Enum
Public Property protocolType() As Protocol
Get
Return _protocol
End Get
Set(ByVal value As Protocol)
_protocol = v...
Check out the simple code below :
Public Class Form1
Private _items As List(Of String) = New List(Of String)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
_items.Add("Item1")
_items.Add("Item2")
_items.Add("Item3")
ListBox1.DataSource = _it...
please tell me what is below code doing? is it creating array with two values or its creating to string index which will take value later?
var $requiredValues=Array(
'MaxResponses',
'AvailableOnlyIndicator'
);
...
i have created a template xml file witch contain some words like {contentname}.
i need to replace such a tags with my values.
please tell me how to search such a words and replace using filehandling in vb.net
my xml templatefile is like this:
<!-- BEGIN: main -->
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelSearchRQ xmlns="http://ww...
Hi,
AM a Beginner AM faceing a problem with updating my data adapter.my database is MS Access and my table to be updated is course all its field except courseid(number) are text.
Am facing the problem i.e failed to conver parameter from string to int32 when i click save button
When the user clicks add the controls clear and user enters ...
Hi
i'm creating a windows form to send/receive data to/from serial port.
At first : i send the data as string to the serial port .
Second: i tried to read the string again for test the successfull transmission , but i recieved empty string
this is my code :
Try
Dim SerialPort1
As New SerialPort("Com1",9600, Parity.None, 8, StopBi...
Using VB.Net I've added a CTRL-C handler:
AddHandler Console.CancelKeyPress, AddressOf QuitHandler
Which does the following:
Private Sub QuitHandler(ByVal sender As Object, ByVal args As ConsoleCancelEventArgs)
Console.WriteLine("Quitting...")
args.Cancel = True
Quit = True
End Sub
I then have a main l...
i have got a object of attribute and i want to know what is its node name (who contain this attribut) .. please give me solution (vb.net preferable)..
...
Hello.
I have faced with a situation in VB.NET and C# (.NET2) with the visibility of the static/shared members. It seems to me a little strange in VB.NET:
public class A
{
private static A instance;
public static A Instance
{
get { return instance; }
}
public string Name {...
The software company I work for offers data conversion as a service for new clients who have previously used other similar software. I've written a VB.NET application to automate common conversion operations, and have separate logic between known vendors. A particular file layout has become rather common, but due to the nature of how t...
Below is my code to transform XML using XSLT:
Private Sub Transform(ByVal XslUri As String, ByVal XmlString As String, ByVal OutputUri As String)
' Create the XslTransform object and load the style sheet
Dim xslt As New XslCompiledTransform()
xslt.Load(XslUri)
' Load the file to transform
Dim input As XmlReader = Xm...
Hello.
I wonder what is (if is) the "shortcut"(code-snippet) for adding handlers in VB.NET (Visual Studio 2005/08), equivalent to the += + Tab + Tab in button1.Click += ... C# IDE.
In this way C# IDE auto-creates the necessary method, with all necessary parameters.
So, If I know that I need to execute a method at a event even if I don...
Anyone know how I can dynamically load a control inside of a shared/static function? The function itself is inside of a mustinherit/abstract class. (It's an ASP.NET project in VB) I want to do something like this:
VB:
Public Shared Function GetWidget(ByVal name As WidgetName) As Control
Select Case name
Case Wi...
Example:
Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C:\temp\catalog.zip"
Dim sf As Object = Sh32.NameSpace(path)
-> does not work, sf = Nothing
Dim Sh32 As Object = CreateObject("Shell.Application")
Dim path As String = "C:\temp\catalog.zip"
Dim sf As Object = Sh32.NameSpace(path.ToString)
-> works...
I've a php script that if the user ahs the privilege to download and image the image is sent to webbrowser but if the user has not the privileges and xml with the info is displayed.
phpcode:
if($this->can_download($user->id)){
$id = int_escape($_GET['id']);
$image = Image::by_id($id);
if(!is_null($image)) {
$page->set_mode("data"...
I've created a Datagridview bound to a Datatable. This Datatable is updated by a event to reflect statistical information as it changes (sub second resolution). I have a checkbox to determine if a row is available for other functions and can be toggled on and off normally if my eventhandler is not receiving my updates.
If my bound Datat...
I am generating an XML file from a VB.NET app. The document was generating fine before I tried to add nillable elements. I am now testing putting in just one nil element as:
<blah xsi:nil="true"></blah>
Once this element is in place and I try to view the XML file in IE it is unable to display. I am receiving:
> The XML page canno...