Questions tagged "vb.net" (page No.1)

how can i pass parameters from javascript to hidden field in controls vb.net

i have a control that has two asp:HiddenField <asp:HiddenField runat="server" ID="tabTitle" /> <asp:HiddenField runat="server" ID="tabMenu" /> this control load in a page called Alarms the control on the alarms page look like this <alarm:SubscriptionPanel ID="pnlSubscription" runat="server" /> what iam trying to do is passing value ...

DataTable.ImportRow() plus 2 values?

I need to copy a datarow from one datatable to another. I do not know the specific column names of the original datatable as it is created dynamically. The destination table has two additional columns that need to be populated at the time of the copy process. I have put ...

MVC Membership & Profile Strategy

Bear in mind, I have researched this and have found several articles, however, they are mostly old (like from 2008) so I am wanting more recent information pertaining to the latest version(s) of ASP.NET MVC. I am using the Membership built-in thing to provide user registration, login and roles. I want to ...

Image Upload Using Httpwerbrequest error

I need some help regarding upload image using Httpwebrequest .. I am tryin the things with the below code it gives me error (the underlying connection was closed the connection was closed unexpectedly) Here is the Code Try Dim boundary As ...

Disposing ActiveX Control on a Form

I have a third party ActiveX control that I am embedding in a form. The control's class implements IDisposable. My question is should I manually call the control's dispose method either in the form closing event or go into the designer and edit the form dispose method to call the ...

Using Keyword: .Close or .Dispose

When implementing the using keyword to instantiate an IO.StreamWriter object does that imply that .close is called on the object or .dispose? Or does it matter since once it hits the end using it is out of scope and will be garbage collected anyways? ...

Linq: Checking if string column has a value (ie. is not null or empty)

Not sure if this is the best way to achieve this in Linq. I'm trying to select Contact records in CRM 2011 where the EMailAddress1 contains a value. The following WHERE clauses I tried both caused exceptions: Where c.EMailAddress1 > "" Where Not String.IsNullOrEmpty(c.EMailAddress1) So I ended up trying this, which seems to work ...

asp.net Class reference error

I'm writing a web app in ASP.Net. At the top of the web page I have: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="software-mgr.aspx.vb" Inherits="ftp_access_software_mgr" EnableViewState="True" EnableSessionState="True" %> <% Dim ssMgr As SoftwareFTPStorage = New SoftwareFTPStorage Dim ssDBMgr As SoftwareStoreDBTools = New SoftwareStoreDBTools ...

VB.Net Convert Byte Array to SQLBinary

I Searched and searched and found no clear answer to this problem. How to convert array byte to SQLBinary. I've tried with Narrowing/Widening Operators but nothing seems to work... Public Shared Widening Operator CType(ByVal p1 As Byte()) As SQLBinary End Operator This throws an error: Error 8 Either the parameter type or the ...

Implements through inheritance

I'm having issues implementing an interface which vb.net is not picking it up through inheritance, not sure its possible but i believe there should be a way Public Interface ITest Sub SomeMethod() End Interface Public Class Test Inherits OtherClass Implements ITest End Class Public Class OtherClass ...

VB.NET MySQL Connection (DB not local)

I'm trying to connect to a MySQL server via VB.NET, but my program keeps freezing on the con.Open() line. Imports System.Data.SqlClient Imports System.Data .... Dim con As New SqlConnection Dim cmd As New SqlCommand Try con.ConnectionString = ...

Silverlight validate values entered in datepicker control

I'm using Silverlight 4. The datepicker control comes with a textbox and a calender. I am trying to validate the date to make sure user doesn't enter in any letter, but only number, "-" or "/". When the property "DateValidationError" is used, it doesn't seem to know that i entered ...

vb.net comparing two databases

i have 2 databases one i load to a datagridview and one i use the OleDbDataReader to get the data from. i want to update the database that i load to the datagrid view based on changes i do to the other database using access like changing a cell value in ...

VB.Net Reverse DataTable Order

What's the easiest way to review the order of a DataTable? ' Clean Table dtRows.Columns.Add("date", GetType(DateTime)) For Each row In dtRows.Rows row("date") = DateTime.Parse(row(0).ToString.Replace("""", "")) Next ' Remove ...

how to update a visual basic application without reinstalling

I have a simple form with a button when clicked says Hello. Code as follows: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox("hello") End Sub End Class I installed it on my machine and now I was wondering how would i write updates to it ...

VB.NET Using recursion with 9 instances of a class, how to check what instance i'm on?

This is related to a Think-A-Dot college project. I have a list of objects of type Flipper as so: flipper1, flipper2, flipper3... flipper8 My thought was to do a recursive function to iterate through each flipper and process each one individually instead of dealing with many if-statements; i figure going with something such ...

"Pop up menu is invalid" error

After looking over several articles in internet I was not able to figure out why the following error is thrown.... I have a WIP(work in progress) grid on my home page and I have a export button which uses Infragistics and when I am trying to hit the export button and ...

vb.net database Number of query values and destination fields are not the same

i have a database with 16 fields and i just want to fill the first 7 fields. i am using this command "INSERT INTO products (SupplierID, catalogid, ccode,cname,oprice,cprice,pother2) VALUES (" & reader("SupplierID").ToString() & "," & reader("catalogid").ToString() & "," & reader("ccode").ToString() & "," & reader("cname").ToString() & "," & reader("oprice").ToString() & "," & ...

« Previous12345678910 ... 16681669Next »Show All