Questions tagged [vb.net]

Visual Basic.NET (VB.NET) is a highly versatile and modern computer programming language that supports multiple paradigms. It ensures security through its managed and type-safe features, while also providing an object-oriented approach to coding. In tandem with C# and F#, VB.NET stands as one of the prominent languages designed for the dynamic .NET Framework. Considered as the future iteration of Microsoft's Visual Basic 6 (VB6), VB.NET takes advantage of the power and capabilities offered by the Microsoft .NET Framework. Please refrain from using this tag when referring to VB6, VBA, or VBScript inquiries.

Delivering XML in response to a webmethod call

While working with an ajax PageMethod to call an asp.net webmethod, I encountered an issue when trying to pass a significant amount of XML back to a callback javascript function. Currently, I am converting the XML into a string and passing it in that form ...

Having trouble loading data through ajax in Jquery Datatable?

I'm new to using Jquery datatable and I'm facing an issue where my data is not loading into the table. Here's the code snippet that I am using: $(document).ready(function () { $.ajax({ type: "POST", url: "TestDPRDetail.as ...

"Exploring the Relationships in Entity Framework: Understanding the Connection Between Child and Parent Entities through

I've been working on a project utilizing EF5, Vb.net, AJAX (Javascript), ASMX-Webservices and HTML. Here's my query concerning classes: Public Class Company Public Property CompanyId As Integer Public Property Name As String Public Overridab ...

Can you explain how to convert this PHP code to VB.net?

Can someone help me find the equivalent vb.net function for this PHP code that retrieves a random image URL from Google Images? Function GetRandomImageURL(topic As String, Optional min As Integer = 0, Optional max As Integer = 100) As String ' get ...

Is it possible for Javascript to handle a string of 27601 characters in length?

I have created a webmethod that returns an object containing strings. Each string in the object is of length 27601. This pattern continues for all array members - str(0) to str(n). When my webmethod returns this exact object, I encounter an issue on the c ...

Update a row within a gridview using the button click event

I currently have a gridview displayed in my application: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True"> <Columns> <asp:TemplateField > <ItemTemplate> ...

Generate a flexible JSON array in VB.NET

Looking to generate a flexible array that can be converted into a JSON array for visualization with Morris charts. The usual approach in VB.NET is as follows: Dim xArray(2) xArray(0) = New With {Key .TradingDay = "Day1", .Seller1 = 1500, .Seller2 = 160 ...

Can you show me the steps for downloading the WebPage component?

My goal is to save webpages offline for future use, but when I download them as html many of the included components disappear! I attempted opening them in a WebBrowser and downloading as html with no success. One potential solution is to download the ht ...

Utilizing Ajax for populating a cascading selection menu

Currently, I am in the process of dynamically changing the options in a drop-down list using ajax and jquery by fetching data from a database. With jquery, I can easily clear and add new options to the drop-down. However, my issue arises when attempting to ...

Implement automated functionality to dynamically generate and incorporate AJAX controls onto an ASP page

Can dynamic AJAX controls be programmatically added to an ASP page? I have successfully created Textbox and Listbox dynamically in the Page_Init Event. However, my Hover Menu only attaches to the first ListBox. I want to add it to the loop that creates t ...

Tips for executing a .exe file in stealth mode using JavaScript?

I am currently working on the transition of my vb.net application to JavaScript and I am facing a challenge. I need to find a way to execute an .exe file in hidden mode using JS. Below is the snippet from my vb.net code: Dim p As Process = New Pro ...

Leveraging the power of VB.net to extract data from JSON code

Hello, I need to extract the values of 21, black jack, and tongits including their scores from the following JSON code: { "id": 1, "status": "PARTIAL", "scores": [ { "scoreCard": { "21": 0, "black jack": 0 ...

What is the process for executing Selenium IDE scripts in Selenium RC?

As a newcomer to using the selenium testing tool, I am seeking guidance on running selenium IDE scripts within selenium RC. I would greatly appreciate examples and screenshots to help me better understand the process. ...

Sorting outcomes based on HTML file

Attempting to narrow down results based on certain criteria within a large HTML file. Unsure if my query is attainable, but it never hurts to inquire. Currently immersed in a browser game featuring a vast map measuring 100x100, with each pixel representing ...

javascript: window.open()

I am currently using VB.NET 2005 and I have a requirement to launch a new browser window using Process.Start(). The challenge is that I need to specify the size of the browser window, for example, height:300 and width:500. Process.Start("firefox.exe", "ab ...

Extracting information from a string with JSON in Javascript

Can you assist me? I have developed a web service that provides a clean string after clicking on the URL: { "PersonID": 125, "Title": "Security Officer", "Company": "TSA", "CellNum": "423-915-3224", "EmergencyPhone": "", "Email": " ...

Changing a Unique JSON Structure into a VB.NET Object

I have a JSON object that is structured as follows. { "Errors":{ "err1":[ //* Array of err1 objects ], "err2":[ //* Array of err2 objects ] } } This object is used to report errors identified in a request to a PHP page. My goal i ...

"Error in code behind due to NullReference when processing object after an AsyncPostBack triggered by UpdatePanel

A project I'm working on involves creating a basic game within an ASP.NET/VB.NET web application. The game interface consists of multiple ImageButtons. Within the code-behind file of the web page, there is a reference to the game object which handles each ...

Converting SHDocVw to Selenium to extract all inner text of a specific tag name

I'm trying to automate this task using Selenium with VB.net and Microsoft Edge Dim findDuplicates As IHTMLElementCollection = HTML.getElementsByTagName("td") For Each element As IHTMLElement In findDuplicates If el ...

What is the best method for converting a JObject to an array in VB.net?

How can I convert a JObject into a specific property list? Below is the JSON data I have: { "response":{ "result":1, "resultcount":1, "collectiondetails":[ { "publishedfileid&qu ...

Using JSON in JavaScript to handle the click event of ASP.NET buttons

Here is the code that works well for me. I need to execute two different server-side functions, and they can't run at the same time as I have separated them. Default.aspx/AddCart btnUpdate Click Event The issue I'm facing is that the alert box pops up a ...

Using selenium, you can easily download a file without needing the direct URL

I need assistance with using Selenium for website automation in Chrome using vb.net. I am trying to download files from a website that does not have direct URLs for download buttons, as the downloads are triggered by JavaScript. How can I accomplish this i ...

Parsing Newtonsoft JSON into an object

I'm a bit out of touch with VB, but I'm trying to parse a JSON string. I've already done this in C# without any issues. This is for an older project where I'm using VS2008. This is the class structure: Public Class ResponseMeta Private _type As String ...

Initiating a Page with Dynamic Modal Window according to Backend Exigencies

Dear experts, can you help me with a problem? I want to implement a modal window on an vb.aspx page if a specific condition from the codebehind query is true. How can I achieve this? Thank you! ...

How to implement the onRowClick event in ASP.NET Gridview to show record details without using a Details/Select button

I'm currently working with a gridView and have configured a button within it to display detailed information when clicked. This button calls the DetailsView() function, which executes an SQL command and binds the data to a repeater for a custom details vie ...

Executing JavaScript code within ASP.NET Visual Basic

My current web application uses jQuery and JavaScript, but I want to add more features that are supported in ASP.net VB. However, I am unsure if the JavaScript can run after the VB code. Essentially, I would like the web app to follow this sequence: ...

Sending a parameter as text from .NET code-behind to a JavaScript function

So here's the situation: I have a gridview that is displayed in a new window separate from the parent window. This gridview contains multiple records, each with a "view" button that allows users to see more details about the record within the same newly op ...

Utilizing Awesomium in .NET with Visual Studio 2010 (ObjectForScripting)

Struggling to find examples on how to utilize the Awesomium web browser control in vb.net with objectforscripting. It seems like objectforscripting works differently for Awesomium compared to the traditional IE control in vs 2010 due to it being HTML5. Th ...

Deciphering JSON data outcomes in VB.NET

How can I extract specific data from the given code snippet stored in a textbox? { "items": [ { "snippet": { "channelId": "UCcTbyoZjhqoCn4yVawpMFDA", "title": "Forever - Stratovarius", "categoryId": ...

Updating the ContextKey of the DynamicPopulateExtender based on the selected value from a DropDownList dynamically

I am facing an issue with my DynamicPopulateExtender control. I need it to render HTML based on the value of an asp:DropDownList. The problem lies in writing the JavaScript code that can fetch the dropdown value, assign it to the DynamicPopulate control&ap ...

Troubleshooting custom fonts not displaying on a .NET website: Importing fonts for web use

https://i.stack.imgur.com/uWSsY.pngI am well-versed in HTML, but my knowledge of VB.NET is limited. In standard CSS, including a font like the one below would typically work, but I have encountered issues when attempting to do so in .NET. @font-face { f ...

"Retrieving Data Using jQuery's .ajax Method in Visual Basic

<WebMethod()> Public Shared Function gtet() As String ... Dim GET = uClass.GetSets(dbuser, dbparam1) ... End Function and $(document).ready(function () { data = { }; var jsondata = $.toJSON(data); $.ajax({ type: "GET ...

Converting C# to VB.Net: Understanding Selenium Wait Commands and Examples

I need help converting the code in the example text. Can you show me how to do it? wait.Until(e => e.FindElement(By.XPath("//a/h3"))); Original Source : Wait | Selenium Original Code : driver = new ChromeDriver(); driver.Url = "https://www.google.com/ ...

The Challenge of Managing ViewState with AJAX CascadingDropDowns

Question: Is there a way to preserve the contents and selected values of both dropdowns after postback? Source Code: Feel free to download the source code by clicking on this link (as the link is now working). Make sure to include a reference to your Ajax ...

The process of deserializing JSON data in VB.Net

I have a JSON data that I need to convert back into objects. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim client As New RestClient(BaseUrl) Dim Respons As Object client.Authenticator = O ...

Struggling with understanding how to parse JSON in VB.net

Looking for some assistance. I'm grappling with parsing the JSON output provided by the cloudstack API in vb.net and feeling a bit stuck. The JSON response from the cloudstack looks like this: { "listcapacityresponse": { "count": 6, ...

Create a .exe file from the ordered test for export

Currently, I am working on testing the user interface of my web application in VB.Net. My preferred tool for this is Selenium. I have created an ordered test and now I am looking to export it as a .exe file. However, when I compile my test unit project in ...

Error with Bootstrap Layout caused by the StringBuilder

After diving into Bootstrap, I encountered an issue with the layout generated by a VB.NET page using StringBuilder. The result was a disorganized mess: Upon further inspection, it became evident that the problem extended to other sections of the page as w ...

How to extract data from a JSON string using VB.Net

As a beginner, I am finding it challenging to understand how to utilize the Newtonsoft JSON methods in VB.Net to extract specific information from a JSON string. The JSON data consists of two main parts: the 'Total' and the 'results'. ...

Issue encountered when attempting to send quotation marks to the web service using AJAX

Using .ajax, I am sending data with the following attributes: data: '{ "UserInput" : "' + $('#txtInput').val() + '","Options" : { "Foo1":' + bar1 + ', "Foo2":' + Bar2 + ', "Flags":"' + flags + '", "Im ...

Creating a style rule on a partial postback using Header.Stylesheet.CreateStyleRule

After implementing an UpdatePanel on my webpage to display different usercontrols, I encountered a problem with adding inline styling dynamically using Header.Stylesheet.CreateStyleRule during partial postbacks. It seems that the styles are not being inser ...

Using JSON in Visual Basic 2010 to Encode and Decode Objects

Here is a snippet of code I have: Imports Newtonsoft.Json Imports Newtonsoft.Json.Linq Module Module1 Structure JSONList Dim Name, Email As String Dim Age As Integer End Structure Sub Main() Dim Data(1) As JSONList Data(0).Name = "Josh" ...

An unexpected character was found during the parsing of the value: S. Path '', line 0, position 0

Despite the abundance of posts on this topic, I struggled to find a solution that addressed my specific issue. I want to clarify that I have already verified that the encoding is correct. Additionally, the Exception sometimes occurs and sometimes doesn&apo ...

Obtaining an image from encoded JSON information

This inquiry pertains to Visual Basic .NET 2010 How do I extract the image from this encoded JSON string? What type of encoding is being used here? I'm attempting to capture a screenshot of a website using the Google PageSpeed API. "screenshot": { ...

What steps should I follow to incorporate a customized class into my Windows Forms 2.0 project?

Exploration I encountered an issue while trying to incorporate a customized class into my project for the purpose of deserializing and manipulating JSON data stored in a text file. Here's the code snippet that represents the class: Imports Newtonsoft.Json ...

Is there a way to fetch JSON data for a JQUERY datatable?

Is there a way to create JSON data for binding JQUERY data table? In my ASP.net web service (.asmx) code, I have the following snippet: <WebMethod()> _ Public Function Getcdata() As String Dim dt As New DataTable() Using con As New SqlConne ...

Is there a way to select a Dropdown menu choice on a website by utilizing VB.NET and Selenium?

Currently, my main goal is to access the Supplier section on the website. I have included a screenshot of the source code for reference. At this point, I have successfully logged in to the site, but now I need to navigate to the next screen by clicking o ...

Effective Management of Unwanted Postbacks in VB.NET with Ajax UpdatePanel

TASK: Develop a webpage that presents a loading animation upon button click, which disappears once processing is finished. CHALLENGE: I have set up a page with an Ajax UpdatePanel that initially functions correctly by showing a loading screen on button cl ...

Challenges with locating text within the innerHtml property of a VB WebBrowser Object

Using Visual Studio 2010 with Visual Basic.NET In my project, I have created a form that utilizes a WebBrowser control to load an HTML file. Users are able to search for specific words or phrases within the document, prompting me to extract the innerHtml ...

Unable to Retrieve HTML Element by TagName using VB

I am currently working on a project in VB that involves retrieving elements by tag names, similar to what I used to do in VBA. However, I am facing challenges as my code seems to freeze after opening a new browser window. Public ie As New SHDocVw.Intern ...

Repetitive Anchor IDs and Web Standards Compliance

Today, I encountered the task of converting outdated attributes on a page to make it more XHTML friendly. This led me to consider the anchor tag and its usage: Initially, I had anchor tags in the form of <a name="someName"></a>. However, upon ...

The Controller received a JSON object that was empty

I know this question has been asked countless times, but I've tried all solutions with no success. Here's the JSON object in question: { "manufacture":"HP", "model":"testModel", "serialNumber":"testSerial", "description":"Test Description", "c ...