vb.net

Navigation images not displayed properly in jQuery lightbox

From this aspcode.net page at the bottom (under attachments) you can download the project. For some reason when I run it the Close Button and the Next and Previous Buttons don't work. Well I mean it does work but it does not show the actual images. Can anyone figure it out? It should be easy but I just cant get it to work. ...

What's the equivalent of VB's Asc() and Chr() functions in C#?

VB has a couple of native functions for converting a char to an ASCII value and vice versa - Asc() and Chr(). Now I need to get the equivalent functionality in C#. What's the best way? ...

kill all programs from user x with vb.net

Hi, I try to kill all processes of a specified user. i use Try Shell("C:\WINDOWS\system32\taskkill.exe /S localhost /U userx /P passwort /f /FI " & Chr(34) & "USERNAME eq userx" & Chr(34)) Catch ex As Exception MessageBox.Show("LogoutException occurred. " + ex.Message) End Try But Nothing happened. If i...

Strong Signed Assemblies

I have a project I made in Visual Basic 2008 Express. I converted it from someone else's C# project, but it works. It has several DLL dependencies. I went to publish my project so I can install it on another machine and for each DLL, I get an error: "Assembly must be strong signed in order to be marked as a prerequisite." I've done some ...

.net WebService, bypass ssl validation!

Well im working agains a webservice that has a certificate that is not 100% correctly setup the certificate is setup for the domain *.domain1.com and the api is located at soap.shop.domain1.com/SOAP now i cant connect to this webservice as i then get a WebException "Could Not establish trush relationship for the SSL/TLS secure channel. -...

Multidimensional arrays do not implement IEnumerable<T>, or do they?

For the reasons that I still do not understand (see this SO question) multidimensional arrays in CLR do not implement IEnumerable<T>. So the following does not compile: var m = new int[2,2] {{1, 2}, {3, 4}}; var q = from e in m select e; Then how come that this works just fine in VB.NET? Sub Main() Dim m(,) As Integer = {{1, 2}, ...

System.Windows.Forms in asp.net 3.5

I'm trying to implement a website screen shot class as described here http://www.plentyofcode.com/2007/09/website-screenshot-capture-with-aspnet.html The class imports the following methods Imports System Imports System.Drawing Imports System.Drawing.Imaging Imports System.Windows.Forms Imports System.Diagnostics Namespace GetSiteThum...

What is the best way to log exceptions in Visual Basic, on an ASP.NET Application ?

I'm working on an ASP.NET web application, written using Visual Basic, and I'm trying to track down an error message that I'm getting. I'd like to get it to log the exception to a file (or the event log) so I can see it, as the error only occurs on the production server, and not on the development environment (therefore VS isn't instal...

Error when using link href inside my ContentPlaceHolder

I am using a MasterPage in my project... This this the link i need to place inside my ContentPlaceHolder of my Dedault.aspx page <link href="jquery/imagebox/imagebox.css" rel="stylesheet" /> But i get a error "Element link cannot be nested within element td" Any idea what to do? ...

Is there an analogue to Rails partials in VB .NET?

I'm new to VB .NET, and if possible, I'd like something like Rails partials - bits of HTML template that can be referenced in a page's script, possibly within a loop. I know there might not be anything like that. ...

Using AesCryptoServiceProvider in VB.NET

My problem is actually a bit more complicated than just how to use AES in VB.NET, since what I'm really trying to do is use AES in VB.NET from within a Java application across JACOB. But for now, what I need to focus on is the AES implementation itself. Here's my encryption code Public Function EncryptAES(ByVal toEncrypt As String, By...

How do you dynamically get a particular method's name in a strongly typed way?

Hi, I'm a little unsure how to word the title to this question but I'm looking for a the shortest/aseist way in VB.NET (or C# but using VB.NET at the moment) to get the string value of a method's name dynamically given the method call. For instance, I have a class like this: Public Class Blah Public Sub Foo() End Sub End Class...

How do I create a delegate for a .NET property?

Hi, I am trying to create a delegate (as a test) for: Public Overridable ReadOnly Property PropertyName() As String My intuitive attempt was declaring the delegate like this: Public Delegate Function Test() As String And instantiating like this: Dim t As Test = AddressOf e.PropertyName But this throws the error: Method 'Pub...

Get text from DataGridView selected cells (VB.NET)

I have a DataGridView with cells from a database file that contains data. Basically, I want to get the text from the selected cells in the DataGridView and display it in a textbox at the click of the button. The code for the button click event is: Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles But...

vb.net code to make a image transparent

I wish to make a bitmap image (.bmp) transparent using VB.NET code. Kindly help me. ...

Calling methods on interop objects, VB vs. C#.

In C# I'm calling a function on an interop class (Connection, written in VB6), which itself returns a plain object (System). Then there's a function on that object (InitialiseData) that I also call (even though the compiler isn't aware of it). var isInitialised = Connection.System.InitialiseData(path); The problem is, because that Sys...

XML Parsing Error: no element found

I am using NiceEdit to format text in text areas, it displays a toolbar over the specified text area, I created a test page, its working, I Response.Write the content of the text area after being formatted, and its okay, I created a break point to see whats being read, it was all fine. Now I moved to the real page where I should impleme...

Error when setting the datasource for a gridview

I have a gridview. Its datasource is set as follows. dtTable is a datable in which the values for the table will be retrieved. But when setting dtTable as datasource I get an error "Object reference not set to an instance of an object". What may be the reason for this? gridview.Datasource = dtTable gridview.Databind() ...

Best way to maintain an autocomplete/suggest list across sessions

Hi, I would like to maintain a list of all of the strings entered into a ComboBox across all uses of an application on a given PC, for use as the AutoCompleteSource for that ComboBox, i.e., I enter in "Fred" in the ComboBox, commit the data, close the application, reopen the application, reopen the ComboBox, type "F", receive the suggest...

Need a little help with ComboBox DataBinding DisplayMember and LINQ queries

Update I decided to iterate through the Data.DataTable and trimmed the values there. Utilizing SirDemon's post, I have updated the code a little bit: Sub test(ByVal path As String) Dim oData As GSDataObject = GetDataObj(path) EmptyComboBoxes() Dim oDT As New Data.DataTable Try Dim t = From r In oData.GetTable(St...