vb.net

VB.Net .Clear() or txtbox.Text = "" textbox clear methods

Hey guys, not far into programming and just joined this forum of mighty company so this is a silly question, but what is the best way to clear textboxes in VB.Net and what is the difference between the two methods? I have also seen people be critical of folk using clear objects on their forms and i can see why but in this case, i am only...

Is it possible to have location authorization nodes in a web.config be external?

Is it possible to have location authorization nodes in a web.config be external? Such that I could take all of the nodes simlar to <location path="elmah.axd"> <system.web> <authorization> <allow roles="Administrator" /> <deny users="*" /> </authorization> </system.web> </location> <locati...

Conversion of C# to VB.net List<T> has error

I'm trying to convert some C# code to VB but I’m getting an error. What would be the correct VB syntax? C# return new List<string> {"First Name", "Last Name", "First & Last Name", "None"}; VB Return New List(Of String)() From {"First Name", "Last Name", "First & Last Name", "None"} And how about would I convert this too? Dim lis...

vb.net Formating a date as CCCC-MM-DD?

How do I format a date to CCCC-MM-YY in vb.net ? ...

Count how many "commas" are in a line.

I need a code to count how many commas there are in a richtextbox line. If there are 4 or more commas then do something, else delete line. ...

How to convert the column in order by linq

Select Year From MyTable Order By Cast( [Year] as Int ) Desc Same thing I am trying to do in the linq order by. It's not working. I have column that is defined in the data base as string (Varchar) and I need to cast/convert it to integer before I need to sort it. What should be my linq statement? Thanks in advance. ...

SFML.NET particle system

I've written particle systems before and, put simply, it's more effort than it's worth given the size of the projects I want it for. What I'm ideally looking for is a particle system which can be easily dropped into an SFML.NET project without needing a great deal of manual integration. Does anything already exist to fill this need (ide...

VB.Net Error after change connector version

Hello, I have a project that works well. After changing the mysql connector version of the project shows warnings like this "Warning 1 Could not load file or assembly 'MySql.Data, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. O sistema não conseguiu localizar o ficheiro especificado...

Basics of LINQ :: VB.NET specific Articles / Tutorials

I want to learn usage of LINQ in vb.net. I have no idea at all where to start. Could anybody kindly advise me some good articles/tutorials to begin with? ...

how to read xml from remort url in vb.net

i am working in a project in that i want to read some data from the remote url can any one help me how to do this function ...

Access SAP R/3 data directly from VB.NET

We have an assignment to create some XML outputs from data in SAP R/3. We are using SAP .NET Connector, for doing this. The problem we are facing is that there are some fields which are not exposed by any standard BAPI. Unfortunately we cannot create customized BAPI on this particular system. We are therefore restricted to whatever stan...

Attaching .txt files in .NET

I am developing a desktop application in VB.NET 2005. I have a requirement whereby a user need to select a .txt file from his machine (client) and after clicking the save button, i need this file to be saved in the server into a specific folder. Similarly, i should be able to retrieve the file as well. Please help on this requireme...

set parameters via addwithvalue to stored procedure using odbc

I use codes below to inserts values to database by executing stored procedure. Dim connstring As String = "dsn=test" Dim oConn As Odbc.OdbcConnection = New Odbc.OdbcConnection(connstring) Dim com As New Odbc.OdbcCommand("{? = call sp_test1(?,?,?,?)}", oConn) com.CommandType = CommandType.StoredProcedure com.Parameters.AddWithValue(...

.NET 2010 custom control, multiline String property to be edited in the designer

I'm writing a custom control and I want to add a "MessageText" property of type String: <Browsable(True), DefaultValue(""), Category("CustomControls"), Description("Blah."), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> Public Property MessageText As String The MessageText property is a multiline ...

The intended purpose for <app name>.exe.config file in a VB.NET Forms app.

I am currently reading up on documentation for a possible assignment I might be put on. In a design document they talk about the .exe.config file. They state that its only purpose is to store constants: "Also note that this file is meant to store constants only, it is not meant to write configuration values to (and the .NET 1.1. frame...

infragistics web data tree ie script error

Hello, I work with infragistigs (NetAdvantage 2010.2) and I have a data tree on my page. But with the Internet Explorer (6, 8) the following error message is indicated: "The script break A script on this page causes browser delays. Another version of the script may cause that the computer stops responding." Only in the intert explore...

.net 2010 calling DoEvents (yes I want to) from inside a custom control library

I have a custom control's library. Now there's a control which looks like a panel, and when it opens up I want to animate its vertical growing like this: For h As Single = 0 To finalHeight Step 0.5 Me.Height = CInt(h) ' HERE I WANT TO CALL DoEvents' Next Me.Height = finalHeight If I don't call DoEvents in the loop then the a...

Running animation in background worker

Hi, I m developing an application in vb 2008, and using background worker to copy file(s). I have my own designed form which plays an animationon on the top of the form along with copy. For playing animation i m using "AxMSComCtl2.AxAnimation", on execution i get "ActiveX control '' cannot be instantiated because the current thread is ...

ASP.NET listbox MaintainScrollPositionOnPostBack re-ordering items near bottom reloads listbox at top

I've got an ASP.NET (VB) page with two listboxes. Standard stuff - select an item on left, hit add button and it moves to right, etc. I've also got two buttons to move items up or down in the resulting list. My problem is that if I go to the 2nd to the last item (or any in that range) and move it down in the list the list resets the s...

adding 'row adding " behavior to webdatagrid programatically

Can any one help me adding row adding behavior to webdatagrid programatically Dim RowAdditions As RowAdding = webDataGrid1.Behaviors.EditingCore.Behaviors.CreateBehavior(Of RowAdding)() is giving me the object null exceptionThanks in Advance ...