Visual Basic.NET

92K

Solutions

34

Articles & Videos

24K

Contributors

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to  Visual Basic pre-2002, it is not the same technology,

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi Experts,

Why my code not working?

I have multiple checkboxes and are categoriesed into two parts.

1. Select All (has approx 15-20 checkboxes under it)
2. Release

Scenrio :
Expected : When I click on 'select all' checkbox it should select all the other but except 'release' checkbox.

Not Expected : But in my case the following Code selects all the checkboxes
<script type="text/javascript">
		function checkUncheckAll(theElement) {
			var theForm = theElement.form, z = 0;
			for (z = 0; z < theForm.length; z++) {
			    if (theForm[z].type == 'checkbox' && theForm[z].name != 'ckrelease') {
			        theForm[z].checked = theElement.checked;
			    }
			}
		}
	</script>

Open in new window


<asp:CheckBox ID="ckrelease" runat="server" Text="Release" AutoPostBack="true" TextAlign="Right" OnCheckedChanged="ckRelease_CheckedChanged" />
<input id="Checkbox1" onclick="checkUncheckAll(this);" type="checkbox" tabindex="32" />

Open in new window


Please help.

Regards,
D Patel
0
Salesforce Has Never Been Easier
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Si,

I've added a quartz timer to my web app and let it run in Application_start (global.asax).

The idea is that the timer sends mails once a day.

Problem now is that application_start is not always active (application pool restarts, no activity).
The website is on a shared hosting platform (IIS). So my options are limited.

Does anyone have an idea how to keep the ASP.NET web app alive so the timer is Always running and the mails are being send?

Thanks!

Kind regards,
Gery
0
Hello Experts.

I've made some good progress with learning how to interact with an Access database through VB.NET. The attached project includes some useful techniques for populating ComboBoxes with multiple columns using LINQ queries, and leverages Access' ability to generate Queries (which VS calls 'Views') for the purpose of connecting two related tables for populating the ComboBox list items, and any data bound form objects and DataGridViews.

This project uses two tables; one for a list of Players (which I call 'Roster') and one for a list of Teams. The Roster table has a Teams Key that joins to the Teams table which includes the Team Name attribute. I also decided that I wanted to include a picture of every player so Team Captains would have an easier time identifying who's who ("which of you guys is John Doe?"). So it was easy enough to add a new column to the Roster table in Access of type OLE/Object. I then added the code so the image file could be retrieved and attached to the bound PictureBox. That all works good, but since the PictureBox is only a tiny 120x90, I want to be sure the image file is sized correctly so it doesn't bloat the Access table too much.

To that end, I found a nice solution but it was in C#, so I'm not sure if I was able to convert it properly to Visual Basic. But the real head scratcher for me is understanding the concept of an IO.Stream which is how this image resizing solution is rigged. That leads to my real question -- how do I
0
Hi Experts,

This is my program. I am using some private variable to hold the values. Then I am using them through out the program. I want to know is it the right way to do or I should keep them in the session variable and use them. I am curious to know that when many people access the same web page are these variables going to create problem or change the values.  I am using ASP.net and VB.net.

Thanks in advance.


Partial Class EditCustomerOrder
    Inherits System.Web.UI.Page
    Private Shared Calling_Form As String
    Private Shared CustomerID As Integer
    Private Shared LocationID As Integer
    Private Shared MenuOrderDate As DateTime
   
    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Calling_Form = Request.QueryString("Calling_Form")
       
            If Session("EditCustOrder_Calling_Form") Is Nothing = False Then
                Calling_Form = Session("EditCustOrder_Calling_Form")
            Else
                Calling_Form = Request.QueryString("Calling_Form")
            End If

            If Session("EditCustOrder_MenuOrderDate") Is Nothing = False Then
                MenuOrderDate = Session("EditCustOrder_MenuOrderDate")
            Else
                MenuOrderDate = Request.QueryString("MenuDate")
            End If
0
I am using lotus notes to send email in .net application using c#. I am able to send mails from this application while i run this in my local host. But the thing is when host the application in local IIS server i am not able to send mails.
 I am getting the following error.
Notes error: Notes shared login failed with this ID file.
Please tell me why i am getting this error after hosting the application.
0
OK, so I developed a program that has a green progress bar that turns purple when filling...however when you RDS into a Server 2012 Server it is Gray and fills with Green?

Why?

Thanks,
MarkRDS 2012 ServerWindows 7 Progress Bar
0
Hi Experts,

How to create a public variable which can be used only in the form. Suppose I have form1.aspx. How can I define a public variable which can be used only in form1 .no other form should able to access it.
0
Hi

Is it possible to call a function (in eg Module1) in an Excel cell?
0
Hi Experts,

I am testing my project in multiple computers and found a serious problem.

In Machine 1
I log in as an Admin. Then In the page I have to select Customer, location and Room. Then I click OK to go to a different page. (Sesson Admin='Y')

Then in Machine 2, I log in as a user.  select Customer, location and Room. Then I click OK to go to a different page (Sesson Admin='N')

When I come back machine 1 , where I logged in as Admin='Y' before, it changes it to Admin='N'  and all the selection (Customer, location and Room) has changed to that of machine 2.

What should I do. Please help.

Thanks in advance.
0
I need to copy a table from the main Access database and insert it into another database that is located in a different folder. I am programming in VB.Net. Below is the code I am trying. It gives me an error message at the "cmd.ExecuteNonQuery()" statement.

The error says:  {"Query input must contain at least one table or query."}. I have a database at the external folder location called AssetDatabase.accdb into which I want the table copied. What am I doing in correctly? Is the syntax wrong?

cmd = New OleDbCommand("Select * INTO  [tblAssetData-" & CompanyName & "] IN C:\Users\rkvjr\Documents\Backup\AssetDatabase.accdb FROM tblAssetData", objcon.con)
cmd.ExecuteNonQuery()
 

Open in new window

0
Online Training Solution
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Is there a way to programmatically convert a text file to an excel spreadsheet?
0
Hi,

I have a form form1 with a datagrid. But i call a second form form2 to made a query, to return only some records. I need to return a datatable to form1 and automatically fill a datagrid.
What is the best way to return a datatable from form2 to form1.

best regards
0
I cannot seem to get FedEx Tracking API to work at all.

I reviewed the API and have been trying to get the examples to run.  However when I try todo this I get a lot of errors.  I am trying to build a simple Package Tracking page but the FedEx API is not documented in a way that I can use.

Any help would be great!  

When using the FedEx example code when i run the application i get this error.

An unhandled exception of type 'System.InvalidOperationException' occurred in System.Xml.dll

Additional information: Unable to generate a temporary class (result=1).

error CS0029: Cannot implicitly convert type 'TrackWebServiceClient.TrackServiceWebReference.NotificationEventType' to 'TrackWebServiceClient.TrackServiceWebReference.NotificationEventType[]'
0
I had this question after viewing VB .Net - web browser control.  Automate clicking on and manipulating popup windows after downloading .exe file.

Basically, I am trying to do almost the same thing but I don't want to wait for the "Choose File to Upload" window to load. Instead, I'd like to:

1) Wait till the window becomes available
2) Automatically hide the window and send it back once it becomes available by intercepting the opening of that window
3) Set the file location to the file upload window in the background
4) Once set, click the "Open" button (like how it is being done now)

Could someone please provide some code on this scenario as I really need to get this working.

Cheers.
0
Hi All,

I have query below:

dblSaldoAwal  is double
dblSaldoAwal   = 65422115.24 at debugging,

    sbdSQLCommand.AppendLine(", CAST(" & dblSaldoAwal & "AS MONEY) AS Debet")

The query return

, CAST(65422115,24 AS MONEY) AS Debet

Why it turns 65422115.24  to  65422115,24  ?

What's wrong ?

Thank you.
0
I am doing CSV upload on Asp.net and its taking more than 1 hour to upload, So I has set sessiontimeout as 2 hour, I have set time out in below places:
1) In web.config :<sessionState timeout="120"></sessionState>
2) In web.config: <httpRuntime maxRequestLength="1048576" executionTimeout="7200" />
3) In .aspx page :     <asp:ScriptManager ID="scrpt1" runat="server" AsyncPostBackTimeout="7200">
                            </asp:ScriptManager>
4) In IIS: Application Pool have sesstion timeout as 120min
5) In IIS: In Website Advance setting set session timeout as 120 min.

   Still my page get blank after 1 hour and If i try to refresh then it shows Session Timeout, However my CSV Upload continue to work on database and it completes all upload in database in 2hour but Page get expired. Please help asap.

   FYI I am using IIS 7 on Windows server 2008 machine.

Regards,
Sudhanshu
0
I have installed a C++ add-on to Visual Studio that enable code to be developed for Particle Electron and Photon devices. I have an issue that I believe is more related to Visual Studio than the plug in.
First I installed the plug-in on my home PC (running Windows 10, 64 bit OS) and VS 2015. All worked fine.
I then copied the same steps on my office PC (also running Windows 10, 64 bit OS) and VS 2015 but when I attempt to create a project I get no option to enter solution name or location and the checkbox to create a directory is also gone. When I proceed, I get a project but no solution and then I can never save the project. I can only exit VS if I discard the project.
What-is-should-look-like.JPG
what-is-does-look-like.JPG
0
I am trying to change all my .text properties on all my controls to a different language is selected. Do I need to change something on the form in order to see the change reflected? When I do switch language I still get the same one.

  Private Sub mnuLanguage_English_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuLanguage_English.Click
        If mnuLanguage_English.Checked Then
            ChangeLanguage("en")
        Else
            ChangeLanguage("en")
        End If
    End Sub
    Private Sub ChangeLanguage(ByVal lang As String)
        For Each c As Control In Me.Controls
            Dim resources As ComponentResourceManager = New ComponentResourceManager(GetType(frmSearch))
            resources.ApplyResources(c, c.Name, New CultureInfo(lang))
        Next c
    End Sub
    Private Sub mnuLanguage_French_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuLanguage_French.Click
        If mnuLanguage_French.Checked = True Then
            ChangeLanguage("fr-FR")
        Else
            ChangeLanguage("en")
        End If
    End Sub
    Private Sub mnuLanguage_Spanish_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuLanguage_Spanish.Click
        If mnuLanguage_Spanish.Checked = True Then
            ChangeLanguage("es-ES")
        Else
            ChangeLanguage("en")
        End If
    End Sub

Open in new window

0
Hi Experts,

I have a date picker control.  I have three categories of dates.

1. Menu Available - If menu available for that date then change its color. Which I can do right now.

2. Customer Order available - If Customer order available then change its color to a different color(This web method has a CustID parameter).

3. If the date is a holiday, then disable it.

Thanks in advance.
0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

i am trying to acquire data from the lock-in amplifier in interval of 1 millisecond or less. I am facing problem in writing a program in visual basic regarding data storage and data transfer from lock-in SR830 to computer. More specifically how to write the lock in amplifier commands for data storage and transfer in visual basic language??...can anybody help?
0
Hi Experts,

 How can I display the group header, on the page header of each page. I have attached the screen shot. In the page2.png, My group header is  "Chalk - Clybourn" so my page header is "Chalk - Clybourn". In the second page page3.png my group header is "test - test "  how can I make the page header the same. Actually I want the school name and its address on every page. I already set the "Keepwithgroup" to "After" and "repeatOnNewPage=true". It did not help.

 Thanks in advance.

Page1.png
Page2.png
Page3.png
0
I was using selecetedvalue to obtain the id and for the next stacked combo boxes. The program was debugged and worked good in Visual Studio 2008. I am trying to used the same code on visual studio 2010 but run into  problems using Selectedvalue to do the same thing.
0
I have written code to load tree view in .net as below:

This code is executed to while the user expanding the a node.

 public void Populate_Node(Object sender, TreeNodeEventArgs e)
    {
        if (IsPostBack)
        {
          
            // Authenticating
            TreeProvider cmsTree = new TreeProvider(MembershipContext.AuthenticatedUser);
            //selecting the expanding node
            var node = cmsTree.SelectSingleNode(SiteContext.CurrentSiteName, "/Level1-2ndItem", "en-US");
            CMS.DocumentEngine.TreeNodeCollection myChildren = node.AllChildren;

            //Making array of child treenodes  of selected node
            IEnumerable<CMS.DocumentEngine.TreeNode> TreeNodes = myChildren.AsEnumerable<CMS.DocumentEngine.TreeNode>();
            foreach (var tree in myChildren)
            {
                System.Web.UI.WebControls.TreeNode ParenTreeNode = new System.Web.UI.WebControls.TreeNode();
                ParenTreeNode.Text = tree.NodeID.ToString() + ". " + SiteContext.CurrentSiteName;
                ParenTreeNode.Value = tree.NodeID.ToString();
                AddNodesExpand(ParenTreeNode);
                //AddNodesTillNthLevel(ParenTreeNode);                
            }
        }
    }

    private void AddExpandedNodes(System.Web.UI.WebControls.TreeNode TreeNode)
    {  
        CMS.DocumentEngine.TreeProvider cmsTree = new CMS.DocumentEngine.TreeProvider(CMS.Membership.MembershipContext.AuthenticatedUser);
        var node

Open in new window

0
Hello Experts.

I need some help determining why my Visual Studio 2012 VB.NET Windows Form is hanging whenever I use any dropdown that uses a DataSource. Dropdowns that use a string-based collection do not exhibit this problem.

The basic behavior is this:
  1. Start the Program
  2. Click a Dropdown that uses a string-based selection, and choose a value
  3. Click a Dropdown that uses a DataSource, and choose a value
  4. Try to click on any other control, including the Windows Exit control, but there is no response
  5. Click Stop Debugger icon to terminate the program

I have done some debugging, and find it strange that after the program finishes with the ComboBox events, it wants to go run some other seemingly unrelated code in my Designer.vb file, then go through all my resources (I use a LOT of graphics in this program, and recently added four larger ones (200 - 300KB), but I can't imagine that would cause this.

Other than the four new images, the only new thing I can think of is that I changed the ComboBox to use the ValueMember property so it would show the Name but return the ID (at least I'm pretty sure that's what it's supposed to do). Please correct me if I'm wrong about this, but also know that setting it back to None does not correct the problem.

Also, if there are other debugging techniques you know of that will help me to sleuth out the root cause, that would be great.

Thanks,
Tony G.
0
I am trying to get a json to vb.net class.
I have used the Visual studio converter for this and generated the class, but it is not working.
 The commented   ' Public Property Wlisting() As WooData does not work,
I have tried different methods of calling an array or a list but always get the same error.  The Json that come over appears correctly formed, it is the inability to get it into a class which is the problem.

The line :

  Dim WooResponse = JsonConvert.DeserializeObject(Of WooCommerceData.Results)(result)

gives the following error:
Newtonsoft.Json.JsonSerializationException: 'Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Zetsy.WooCommerceData.Results' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.

To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.

Zit appears I should be calling this as a differnt type of list, but what I have tried gives the same error
=========================================================================


The class is the following:

Namespace WooCommerceData
    Public Class Results
        Public Property Wlistings As List(Of WooData)
        ' Public …
0

Visual Basic.NET

92K

Solutions

34

Articles & Videos

24K

Contributors

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to  Visual Basic pre-2002, it is not the same technology,

Top Experts In
Visual Basic.NET
<
Monthly
>