After embarking on setting up a server with NGINX today, I successfully configured PHP and MySQL. Everything seems to be going smoothly so far. However, I am facing an issue with getting NGINX to open PhpMyAdmin (previously located in the root directory [E ...
Below is the Ajax request I am using: $.ajax({ type: "POST", url: "ProductDetail.aspx/AddCart", data: '{productId:' + 4 + ',productTypeId:' + 0 + ',quantity:' + 1 + '}', contentType: "application/json; char ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Facebook; using Newtonsoft.Json; namespace facebook { class Program { static void Main(string[] args) { var client = new Facebo ...
Hey everyone, take a look at this ... <asp:TabContainer ID="jkhgjkgh" runat="server"> <asp:TabPanel ID="jkkljhgh" runat="server" HeaderText="sdkl;fgjl;kgjdf"> <ContentTemplate> <asp:Button ID="jhgkjgh" runat="s ...
After countless attempts, I still can't seem to properly parse this JSON data. The code I am using for parsing is as follows: var client = new WebClient(); client.Headers.Add("User-Agent", "Nobody"); var response = client.DownloadString(new Uri("https:// ...
I am trying to create an expression for a column in my repeater, but I am not confident about the syntax. My goal is to display "No Document" if the value is equal to "DispForm.aspx", otherwise show the actual value. I attempted to combine all expression ...
In the scenario that I am presented with a JSON string and need to validate it using C#, it is important to understand the structure of a JSON string. The format typically looks like this: string jsonStr = {"Id":123,"Value":"asdf","Time":"adf","isGood":fa ...
Here is the URL that needs to be encrypted: <a class="btn btn-success btn-sm btn-block" href="@Url.Action("myAction", "myController")?Id={{repeat.Id}}&HistoryId={{repeat.HistoryId}}" ng-cloak>View History</a> I am seeking guidance on enc ...
I've encountered an error while trying to execute my Specflow tests. Despite various attempts like deleting the bin, removing all NuGet packages and reinstalling them, and making changes to the app.config file, this error continues to persist. Test N ...
Query: Is there a way to call a C# function from JavaScript code on an .aspx webpage to get authentication results based on a username and password? Here is the JavaScript AJAX POST request I am currently using: $.ajax({ type: "POST", ...
Currently, I am utilizing Selenium Webdriver for automation in C#. Within my application, upon clicking on a specific link, a frame is opened on top of the main browser window. I am able to successfully read text within that frame and switch to it as neede ...
Trying to figure out how to maintain the formatting of plain text email while displaying as virtual plain text in C sharp, specifically when receiving in Outlook 2007 with VSTO. The current code is not preserving the original formatting, instead it changes ...
Currently, I am working on extracting data from the office365 API that returns responses in JSON format. My aim is to store specific data such as Id and DisplayName into variables for further use, but I seem to be struggling with the process. I came across ...
Imagine we are working with the following JSON data: { "apple": 5, "banana": "yellow", "orange": 10, "grape": "purple", } and a C# class is defined as: class Fruits { public int AppleCount { get; set;} public string BananaColor ...
As a novice programmer working on an application for my job, I recently encountered an issue while trying to deserialize a class. The class in question is named Nuget, and its structure is as follows: public class Nuget { public string? Name { get; set ...
Currently, my code is set up like this: public ActionResult Search(SearchModel model) { string url = "http://10.0.2.31/testwebapi/api/data"; WebClient wc = new WebClient(); wc.QueryString.Add("forename", model.Forename); ...
Could use some help with validating error message text in a try-catch block. It seems to be catching every time, looking for advice on the syntax or a better approach to validation. string actualResultText = ""; string expectedResultText = " ...
I need assistance converting the code below from MSTest V2 to NUnit 3. Can someone help me identify the alternatives for CurrentTestOutcome and UnitTestOutcome in NUnit? var status = MyTestContext.CurrentTestOutcome; switch (status) { case UnitTestOu ...
I've integrated a jquery modal popup for saving uploaded files related to a specific device. The modal appears, the cancel button functions correctly, but I am struggling to trigger the onclick event for the Save button... This is what I have implemented: ...
I'm relatively new to using Selenium WebDriver and I've encountered an issue with a notification popping up on Facebook while attempting to log in. Despite searching extensively, I haven't been able to find a solution that works for me. I ca ...
Currently, I am attempting to upload an Excel file using AngularJS + MVC. The view consists of an HTML file with a basic HTML file upload functionality. Once the file has been uploaded, my goal is to be able to access the Excel file within the MVC controll ...
Having trouble passing the ThreadId parameter when submitting a form to my controller through jQuery Ajax. The code works fine, but for some reason, the ThreadId doesn't get passed using form.serialize(). Any suggestions on how to effectively pass par ...
I encountered an issue when attempting to call a WCF service using AJAX from another project. The error message displayed was: The server encountered an error processing the request. The exception message is 'The incoming message has an unexpected message ...
Here is a snippet of code that I am working with: var search = $location.search(); if (angular.isDefined(search.load) && search.load != null) { if (search.load = "confirmEmail") authService.confirmEmailUserId = search.userI ...
Having trouble running Gulp in Visual Studio for an angular app, I encountered the following error message: Cannot evaluate the item metadata "%(FullPath)". The item metadata "%(FullPath)" cannot be applied to the path "node_modulesgulp ode_modulesgul ...
Situation: I am facing a task where I need to export an excel file containing a list of Parts. Users have the ability to select specific columns and only retrieve data from those selected columns in the exported file. To handle this dynamic report, I have ...
I need to achieve two specific tasks with Selenium-Webdriver: hiding the console that pops up and specifying a custom path for the driver's location and version. Unfortunately, I couldn't find a constructor that can handle both a string for the directory ...
Struggling to convert a List object to a Json string has been a major challenge in my ASP.net MVC project. Model: public class PagerBase<T>:List<T> where T:EntityBase { public int totalpage {get;set;} public int pageindex {get;set;} ...
We are currently working on setting up the following scenario: An HTML page sends an AJAX request to a WebApi inquiring about whether or not a user has a specific role. The WebApi then checks with ADFS to see if the user is logged in (if not, it authentic ...
I am facing a challenge with handling very large JSON files, where the car array can contain up to 100,000,000 records. The file size ranges from 500mb to 10 GB and I am currently using Newtonsoft json.net for processing. Input { "name": "John", "age": " ...
Currently, I am utilizing an Ajax function to call an HTTP Post Action method located in the controller. During this process, the action method is producing a basic exception message. To address this issue, I have applied my own personalized handler attr ...
My current project involves using Json.net in c# to create a json file. After building the code successfully, I managed to generate the parser.exe file without any issues. However, when attempting to run this parser.exe on a different server where it is in ...
using MongoDB.Bson; using MongoDB.Driver; protected static IMongoClient client; protected static IMongoDatabase db; public async void Insert() { client = new MongoClient(); db = client.GetDatabase("Database"); str ...
Is it possible to only extract text from my HTML content? var sb = new StringBuilder(); doc.LoadHtml(inputHTml); foreach (var node in Doc.DocumentNode.ChildNodes) { if (node.Name == "strong" || node.Name == "#text" || node.Name == "br" || no ...
I've been trying everything, but I just can't seem to get one query to function properly. My goal is to retrieve information from the SQL Server database in two separate queries - one for album names (based on URL parameter) and another for song ...
I am currently working on a web page that has a text editor, and I need to populate its value using Selenium scripting in C#. I have successfully done this for a textbox following instructions from Set value in textbox. However, when attempting the same pr ...
After reviewing documentation, I attempted to create a performance test for AX 365. Unfortunately, I encountered an issue while trying to build the project in VS 2015 because I am missing the assembly 'MS.Dynamics.TestTools.DispatcherProxyLibrary.Appl ...
I am looking to achieve the following task. Encode a complex JSON object and store it in a hidden input variable. Retrieve the hidden variable using the form collection object. Transform the hidden text value into a dynamic object for seamless data retri ...
Currently, I am working on a basic JavaScript AJAX request using jQuery: $.ajax({ type: "POST", url: "TabbedSummaryPage.aspx/RunReport", data: "{'itemId': '', 'lType': '', 'reportId': '&ap ...
I have encountered an issue with locating a checkbox on the web application that I am writing Selenium scripts for. Despite my efforts, the script seems unable to find this particular checkbox. Here is a snippet of my code: WebDriverWait wait = n ...
I'm attempting to extract text from a div and save it in a text document using Selenium with C#. I'm facing an issue where I can't retrieve the text from the div and store it in a variable. <div data-tid="messageContent" dir="auto">&l ...
I need to dynamically update an element on my webpage based on server-side code events. For example, when I trigger the "Start" function by clicking a button, I want the text inside a specific element to change to "Downloading", and then once the process i ...
I am facing an issue with loading pages completely on the web browser, likely due to heavy usage of JavaScript. To address this problem, I have integrated another browser into the project called Awesomium. I am wondering if Awesomium supports using getEle ...
I need help converting a CSV file into a JSON file using C#. The issue I am facing is that the JSON generated contains only values without any keys. I want to convert it into a key => value format for better organization. Below is my current code: static ...
In my IDriver class, I am looking to implement a method like the following: this.driver.WaitUntil(x => LoginForm.Displayed, TimeSpan.FromSeconds(5)); this.Driver is an IDriver field The current implementation does not wait for element to be displayed ...
I've been working on updating my gridview automatically with the latest data using ajax in c#. I attempted to create an ajax post that calls my c# method, fetches the updated data, and then binds it to the gridview. However, I'm facing an issue where the d ...
Currently utilizing Webdriver in conjunction with C#, one major challenge is that Webdriver cannot test design elements. Therefore, I am exploring the idea of implementing a screenshot comparison tool. Given that I am working on a large website with freque ...
Here is the code snippet I have on the client side: <p>Username:</p> <p><asp:TextBox ID="tbUsername" runat="server"></asp:TextBox></p> <p>Password:</p> <p><asp:TextBox ID="tbPassword" runat="server ...
I need to create multiple radio buttons within a table using Razor syntax under ASP.NET Core MVC. Each row of the table should have an update and clear link to update the record and clear the selected radio button for that specific row. <table class=&qu ...
I have a large array stored in Json format, and the result is saved in a variable called "sz" (string). However, when I attempt to save this Json result (string sz) to a file, it seems that not all of the string gets saved. Why is this happening? The siz ...
I'm looking to integrate Angular JS with Web API for my application. Technologies: Visual Studio 2013, .NET 4.0, Microsoft Server 2003. My Web API and Angular JS Client are on separate domains [Required]. I attempted to implement this using .NET 4.5 ...
Having trouble organizing a list of objects/values from a JSON feed using LINQ? Here is what my JSON feed looks like: { "Project":[ { "ID":"XY1212", "Name":"Some Name", "Description":"U.S. No 2 Diesel Retail Prices", ...
Have you come across a standardized regular expression that captures all valid mobile phone numbers, such as 00923465655239 or +923005483426? I've been searching for it for two days but haven't found an expression that fits these formats. The co ...
I've been experimenting with the following code snippet: <button ng-if="!isAuthenticated()" ng-click="deleteReview()">Delete</button> In my JavaScript, I have: $scope.isAuthenticated = function() { $http.get("api/user/getA ...
Is it Possible to Exclude the Percentage from Google Charts Tooltip? For instance, I am looking to eliminate the display of 33.33% in the tooltip and only show the value itself. ...
I am currently working on a C# application that retrieves the backpack value of players in a game called TF2 using Backpack.tf's API. Here is a snippet of the code: (MAIN CLASS) JsonConvert.DeserializeObject<Json1>(json); (END OF MAIN CLASS) ...
After executing the following SQL Server query, I successfully created a JSON object: SELECT Attribute 1, Attribute 2, Attribute 3,... AS Identifier FROM Table_1 tbl1_obj INNER JOIN Table_2 tbl2_obj ON tbl2_obj.Id = tbl1_obj.Id FOR JSON AU ...
Trying to transfer JSON data from a C# (winforms) application to a static HTML/JavaScript file for canvas drawing without the need for a web server. Keeping the HTML file unhosted is preferred. Without involving a server, passing data through 'get&ap ...
Is there a way to implement the [numericOnly] directive in a textbox using Razor? @Html.TextBoxFor(m => m.salary, new { data_ng_model = "salary" }) app.directive('numericOnly', function () { return { restrict: 'A', require: '?ngMo ...
Is there a way to disable other asp.net radio buttons when one of them is selected? I have three radio buttons, and I want to disable the other two when one is selected. After doing some research, I managed to disable the other two when the third one is se ...
Here is the json string that I am working with: { "Orders": [{ "SubOrderNo": "0582715", "ItemNo": "20415541", "ItemType": "ART", "ItemName": "Fish", "TemplateName": "TP1234", "ObjectType": "MPP", ...
There's a library I'm using with a custom exception, but I've encountered an issue. The custom exception code is as follows: public class CustomException : Exception { public CustomException(string message) : base(message) { } } The library i ...
I have a MVC 3 Web Application with approximately 50 Views. I am curious if it is feasible to incorporate an API alongside these Views without any complications. In my ideal scenario, the server would be operational and every request would be directed to ...
Looking for a way to update a JSON file in C# by deleting specific data sets? Check out this example below: [ { "ID": "ID0000001", "Name": "ABCD", "Std": "4" }, { "ID": "ID5335355", "Name": "JKLM", "Std": "6" }, { "ID": "ID5353 ...
In my c# code, I am currently working with a List of Translations structured like this: public class Translations { public string en { get; set; } public string de { get; set; } } Now, I need to convert it into a Json Object because the function ...
I am working on a project related to Browser Automation, but I'm encountering issues with clicking a specific button. I attempted the following steps: webDriver.FindElement(By.XPath("//*[@id='uploadForm: fileup']/div[1]/button[1]")).Click(); webDriver.Ele ...
I'm currently developing an automation framework that embraces the Page Object Model (POM), and within my project, there is a class file named HomePage. In this class, I have already defined an element using: [FindsBy(How = How.Id, Using = "TextField1")] ...
I am trying to click a link using two different strings. However, the code I have tried does not seem to be working. Can anyone provide any guidance? var xPathString = String.Format("//a[contains(text(), 'Enforcement') and contains(text(), '{0}')]", ...
Currently, I am working on enhancing our website automation testing script. We have a team of part-time staff members whom we rely on to run this script in order to monitor all our web services. However, there is a security concern that arises before dele ...
I am currently working on a project in .NetCore App 2.1 and have created some selenium scripts in C# using the NUnit framework on MacOS. The execution of these scripts has been successful, but I am facing difficulties generating a report using Extent Repor ...
When working with Selenium, we utilize an action to interact with an element by clicking on it at specific coordinates (X, Y). action.MoveToElement(element, X, Y).Click().Build().Perform() I am looking to achieve the same functionality using Javascript. ...
Is there a way to prevent a submit action from occurring when the enter key is pressed within an ASP:TextBox element that triggers an asyncpostback upon text change? Instead, I would like it to click on another button. The Javascript function I am using wo ...
I have a complex t4 text template that generates HTML code. This is what the t4 template looks like: <#@ template language="C#" debug="true" #> <#@ assembly name="System.Core" #> <#@ import namespace="System" #> <#@ import namespace= ...
Currently, I am attempting to transform a JSON string into a DataTable within WEBAPI The structure of the JSON string is as follows: [ [ "Test123", "TestHub", "TestVersion", "TestMKT", "TestCAP", ... ...
I am experiencing an issue with my 3 textboxes, where one is placed in an update panel that refreshes every 4 seconds. Unfortunately, during the refresh process, the focus on controls outside of the update panel is being lost. I need a solution to maintain ...