vb.net

XmlSchema as web service parameter

I have a web method in a web service (in .Net 2.0) which takes in an XmlSchema object as a parameter. When I add a reference to this web service in my application, it shows the parameter type as "WebServiceNamespace.XmlSchema" instead of "System.Xml.Schema.XmlSchema". and I cannot make a successful call to the method. It is a web servi...

Is there a way to syntax highlight an If - End If statement in VB.Net

I am trying to read through some code and it would be helpful if the editor in VS 2008 would highlight the If statement by using the cursor and double clicking the End If statement (or something like that). I believe I could do something like this in Java using Eclipse - it was very good at highlighting a code block by clicking next t...

Visually remove/disable close button from title bar .NET

I have been asked to remove or disable the close button from our VB .NET 2005 MDI application. There are no native properties on a form that allow you to grey out the close button so the user cannot close it, and I do not remember seeing anything in the form class that will allow me to do this. Is there perhaps an API call or some magi...

How to order by multiple columns using VB.Net lambda expressions

I've done a brief search of this site, and googled this, but can't seem to find a good example. I'm still trying to get my head around the whole "Lambda Expressions" thing. Can anyone here give me an example ordering by multiple columns using VB.Net and Linq-to-SQL using a lambda expression? Here is my existing code, which returns an o...

VB.NET Conversion problem when trying to convert from base class to subclass (BC30311: "Value of type '<type1>' cannot be converted to '<type2>'")

Hello! Please take a look at the following code: Public Sub Method(Of TEntity As EntityObject)(ByVal entity As TEntity) If TypeOf entity Is Contact Then Dim contact As Contact = entity 'Compile error' Dim contact = DirectCast(entity, Contact) 'Compile error' Dim contact = CType(entity, Contact) 'Compile er...

Guarding against user-input in a dropdown list?

Should we guard against unanticipated user input from dropdown lists? Is it plausible to expect a user to somehow modify a dropdown list to contain values that weren't originally included? How can they do this and how can we stop it? ...

Inline Data-Binding asp.net tags not executing

My problem is I used to be able to do this, < div runat="server" visible='<%#CallAFunctionThatReturnsBoolean() %>' > and CallAFunctionThatReturnsBoolean() will be called in Page_Load when the control's DataBind function gets called implicitly and the div's visibility will be set correctly. Now for some reason this doesn't happen anym...

How to split a Crystal Reports subreport across a page break?

I'm using Visual Studio 2005 and writing in VB.NET. I have a subreport in a Crystal Reports report consisting of a list of log entries. Sometimes the list of log entries is long enough that it would extend onto the next page. What I see happening is that the list appears on the next page, leaving a big blank space at the bottom of the...

Disable Cell Highlighting in a datagridview

How to disable Cell Highlighting in a datagridview, Highlighting should not happen even if I click on the cell. Any thoughts please ...

Quick question regarding reflection and permissions. .net 2008

I have various projects that use reflection to access and invoke private or internal members in some of the framework classes. These projects all work fine on my machine (running visual basic express 2008), but are they guaranteed to work on another machine, or, say, over a network? I've had a look at ReflectionPermission, but I'm not ...

Populating a list box with variable names from LINQ generated class

I'm quite new to Visual Basic - using Visual Studio 2008 and can't seem to find a way to do the following: I have a few tables in a SQL Server database and have used LINQ to SQL to create classes of those tables. Here's a cut down example of what I'd like: listbox1 filled with table names - APS, SMPS, WCPC, CFLAPS Then from the Select...

Use instance or form name when addressing public variables between forms?

In vb.net, you can address a public variable from another form using the form name along with the variable. form2.show form2.k = 3 However, if you use a form variable to show an instance of the form, you must use that variable name to address the public variable. Two instances of the same form are displayed in the following example. T...

Thread Safety RijndaelManaged, ICryptoTransform.TransformFinalBlock?

Lets say we have this code that runs in the constructor: Dim initVectorBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(initVector) Dim saltValueBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(saltValue) Dim passPharse As String = GenerateKeyString(EncryptionKey) Dim password As Rfc2898DeriveBytes = New Rfc2...

I want to read the PDF file content by content

IS THERE IS ANY Solution for My Problem Hi all, I want to read a PDF file having lots of text, images, tables in it. I want to read the entire file content by content page by page, from top to bottom. For example: The top of the page contains the Heading Then on left hand side the contents and on the right hand side images So I fir...

Calling web service from c++ v6

Hi i have been deploy webservice in vb.net . is there will be any problem if i will cal the webservice from c++ (version 6) or Microsoft Access VBA? Thanks ...

Best way to deploy VB.NET Code / create an assembly on a SQLServer

I've created some functions / procedures with VB.NET and want to deploy them to a SQLServer. Within Visual Studio you can click right and select "deploy". An assembly will be created on the server and a lot of functions and procedures. It's really easy. Now I want to script the whole deployment process. What is Visual Studio doing when...

Is it possible to move the "AutoComplete.vb" file out of the App_Code folder and into a new namespace/project?

When setting up the Ajax Control Toolkit's AutoComplete control, it creates an AutoComplete.asmx and a AutoComplete.vb file. The AutoComplete.vb file automatically ends up in the App_Code folder. I was hoping to move all of these styled-classes into a separate namespace, but the compiler simply does not dig it. Is this possible, or ...

Polymorphism and shadowing inherited members

I have a couple of small classes to represent parts in a search filter. If the searched value equals NonValue the filter is supposed to do nothing. This is defined in a Base Class: Private Class BaseFilter Protected NonValue As Object Protected sQueryStringBase As String = "AND {0} {1} {2} " Public Sub Check...

Save Image to application Path

I am using access database as backend and vb.net with DevExpress as Frontend and i want to save image at Application path and retrive it.so for this can u giv me some idea... ...

Linq grouping by nullable datetime and using this as criteria

I am struggling with a nullable datetime column [DateInsp] in an ASP.NET app which uses SubSonic3, Linq, MS SQL Server 2005. I had this all working when the datetime column [DateInsp] did not allow nulls. A new requirement forced me to set the [DateInsp] column to allow nulls and now I am struggling getting this piece of functionality ...