vb.net

What's the difference between Console.WriteLine() vs Debug.WriteLine()?

What's the difference between Console.WriteLine() vs Debug.WriteLine()? ...

i got sql syntax error when i debug my application..

Hi.. I want to update my database using formatsqlparam, but when I debug it, it has an error saying: "Incorrect syntax near ','." This is my code: Dim sql2 As String = "update infoHotel set nameHotel = N" & FormatSqlParam(hotel) & _ ", knownAs1 = N" & FormatSqlParam(KnownAs(0)...

Sort a GridView Column related to other Table

Hello, i have a GridView bound to a DataView. Some columns in the DataView's table are foreignkeys to related tables(f.e. Customer). I want to enable sorting for these columns too, but all i can do is sorting the foreignkey(fiCustomer) and not the CustomerName. I have tried this without success(" Cannot find column ERP_Customer.Custo...

vb.net datadrig view get each cell value

hello i'm trying to get the first value of a datagrid cell value but it keeps looping trough and returns the last value. here is the code: Dim cell As DataGridViewCell txtoccupier.Text = "" Try For Each cell In dgvREcord.CurrentRow.Cells() txtoccupier.Text = cell.Value.ToString Next Catch ex...

HTTP response differences between browser's view source and netcat's output

I'm looking at a website using Internet Explorer and Firefox. In each browser I select view source and see the website's URL in the links. These links were concatenated together using HttpContext.Current.Request.Url.Host in the code behind. However, when I use netcat or Burp Suite v1.3.03, looking at the same links I see the servername i...

Connecting to remote computer using WinNT:// provider and Directory Services Ignores username/password

--Update #2-- Here is the final code that worked for me. This uses WNetAddConnection2 to establish a connection first, before using DirectoryEntry. Imports System.Runtime.InteropServices Imports System.Net Imports System.DirectoryServices Imports System.IO Module Module1 Sub Main() Dim Computername As String = "SomeCompu...

Stringbuilder vs SQL FOR XML / XSL Transform

I have an interface that loads a list of documents depending on the tab clicked by a user. I've been retrieving the data through XML from a SQL 2008 database with: SELECT col1, col2 col3 FROM documents WHERE typeId = 4 FOR XML PATH('doc'), ROOT('documents') Then tranforming the XML with an XSLT stylesheet. It all works fine. To imp...

whenever I add a newly created row to my dataset the check boxes' check state is still indeterminate

ok, I have an issue with my checkboxes, here's the code: if me.BLD_RElectricalPermitBindingSource.Count = 0 then Dim NewRow as DataRow = dsBuildingPermits.BLD_RElectricalPermit.NewRow newRow("MasterPermitKey") = ugProjectNumbers.ActiveRow.Cells("MasterPermitKey").Value //After this line hits it should add the new row to the BLD...

Get Browsers width in CodeBehind ( C# or Vb.Net )

Hey All Please help me in getting this, Get Browsers width in CodeBehind ( C# or Vb.Net ) Thanks ...

VB.Net variable declaration

I notice that both of these compile without any compiler warnings or errors, even with Option Strict and Option Explicit both turned on: Dim x As Exception = New Exception("this is a test") Dim y = New Exception("this is another test") My question is, is it more proper to use the first way (see variable x) or the second way (s...

VB.Net calling New without assigning value

In C# I can do this: new SomeObjectType("abc", 10); In other words, I can call new without assigning the created instance to any variable. However, in VB.Net it seems I cannot do the same thing. New SomeObjectType("abc", 10) ' syntax error Is there a way to do this in VB.Net? ...

ASP.NET web setup class is not defined

Hi, I've got an ASP.NET application that I installed by creating a web setup. I ran into a problem where ASP.NET wasn't registered with IIS so it gave me a "installation was interrupted" message that told me exactly nothing. Anyhow, I finally got it installed, and I can access the main page, but it's telling me that my class isn't defin...

How do i create winxp style controls

Hi guys, I am trying to make my controls look as cool as xp theme enabled controls like gradient fill background in container controls and colour thames support etc I am not finding a way to start. from where can i start doing it? I am trying to do it in vb.net Edited: EnableXpVisualStyles() I found it to enable visual styles but d...

How do you print and export when using Dundas charts in VB or C#

I'm using Dundas Chart Profession within my VB program to generate a chart based on my data. Right now I have my charts opening fine but I am unsure how to add the functionality to let the user choose to print (and export) the chart once the program is running. ...

How do you export an report while using ActiveReports

I'm using Active Reports within my VB program to generate a report based on my data. Right now I have the report opening fine and it is allowing the user to print, copy, find, etc. I am unsure how to add the functionality to let the user choose to export the chart once the program is running. I've been looking at many tutorials but the...

VB.NET : Rendering memory stream to browser

in VB.NET How can i write a memory stream to browser.My memory stream object has data to build a PDF file.Now i want it to be rendered on browser.How to do that ? Thanks in advance ...

What is the difference between Equals and = in LINQ?

What is the difference between Equals and = in LINQ? Dim list As List(Of Foo) = (From a As Foo In FooList _ Join b As Bar In BarList _ On a.Something = b.Something _ Select a).ToList() versus Dim list As List(Of Foo) = (From a As Foo In FooList _ Join b As Bar In BarList _ On a.Something Equals b.Something _ Select a).ToList() ...

VB.NET - Convert Unicode in one TB to Shift-JIS in another TB

Trying to develop a text editor, I've got two textboxes, and a button below each one. When the button below textbox1 is pressed, it is supposed to convert the Unicode text (intended to be Japanese) to Shift-JIS. The reason why I am doing this is because the software VOCALOID2 only allows ANSI and Shift-JIS encoding text to be pasted in...

ASP.NET/Vb.net: How to create a frame after an image is uploaded ?

Hi guys, i would like to create a fixed size frame for user photos uploaded. I've tought: i, can create a fixed sized image (200 width x 600 height for example), with my personal frame (top, left, bottom, right element graphics) , and in the center a transparency. Ok, but i don't know how to merge the photo into the frame and save the n...

how to make condition to update table ?

hi..i want to make condition to update my table if there's already same data (in the same column) inserted in the table. im using If String.ReferenceEquals(hotel, hotel) = False Then insertDatabase() Else updateDatabase() End If this is the updateDatabase() code... Dim sql2 As String = "update infoHotel ...