I need to send over data to a REST API.I have a dataset with a datatable with the nececessary data. The data has to be in a specific format. I have a .xsd file with the format needed and a .xml file with an example.
I'm trying to write a program which allows a user to determine how many 'I's will go into a text box. (i.e if they select 10 then the text box will look like I I I I I I I I I I ). I'm writing a program where if I click on one of three buttons then a number of 'I's will disappear out of the text box. Button one will subtract one 'I', button two will subtract two 'I's, and button three will subract 3 'I's. I don't know how to get the information from the button into the program to subtract the correct number of 'I's. If I press button one, and I have:
Dim OneI as Integer = 1
How do I get the 1 in the OneI variable into a calculation outside of the btn sub, like into a function or a different sub?
Im trying to send data from a Windows Form to an aspx page and send back a response. Im running around in circles trying to make this work. The data im trying to send is 4 strings. So fare I have this in my code, using the build-in webclient in visual studio 2010, in the windows form sending to the aspx
I have two issues I am trying to correct...First am trying to get my listbox1 to be the selected Comport used to do the send data and get data back.
My second issue is its requiring me to send two times to get my read data back as complete data and has odd shapes with the data I get back in front of and after the regular txt.
Beware, I am very new at this so please take it easy on me... Most help I did find was for older versions I only have the 2010 Visual studio Professional...
In order to re-sort the data received in USB easier, I send the data array received in USB (declared as Byte) to a temporary array (declared as SByte) to re-sort. I declared the temporary array as SByte just for easy sorting. After I compiled, an error message came up "make sure not divided by zero". I tried to use convert.SByte but still didn't help. Is it not allowed to send data to an array with different data type declaration?
I am currently developing an application using VB.NET in which I am using the REST WebServices. I have been able to do the basics with REST, however, I have not been able to add an attachment (more specifically upload a file, using REST which gets attached). I have done extensive research online, but so far I have not been able to find any working examples in VB.NET. To actually upload the data I use System.Net.WebClient. The following VB.NET code does the important work:[code]As you can see, the postString is converted to bytes and then uploaded to the server. However, I do not know where or how I should be posting the raw attachment itself. The documentation for the service we are specifically using states to use a variable "attachment_ 1," which I added to the postString variable, but I am not sure what the next step should be. Should the file be converted into bytes and appended to the postBytes variable?
i am getting an input from the user and i m checking in try catch statement. what i want to do is when the exception is caught i want to stop executing the rest of the code. my code is as below
Public Class AddForm Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click Dim inc As Integer[code]......
When I start typing a variable (or whatever), VB pops up a little box with all possible variables starting with the letters I already typed. It's really smart!
However this option has somehow been disabled. How do I enable it again?
I have this code within a button: If TextBox1.TextLength = 3 Then MsgBox("Please enter 3 numbers followed by a letter. For Example 001A")TextBox1.Text = "" Me.Refresh() End If Although if the user enters 3 numbers only, I want the rest of the code in the button to be ignored so that it doesn't proceed.
For this program im using http method post to recieve messages from the server, when its waiting for a new message to be sent it locks the program up. No biggie, ill just thread the sub... Bad idea... I also have functions "send", "Connect", "disconnect". All on threads... i looked at task manager it started getting up to 100+ threads. I dont know much about threads but that just seems way to much. they will die off and the count will return to 20 but id like to find a different way of keeping the program from locking up but not having 100+ threads.. Little off topic: i used a user control. The only problem now is on the tab, its not anchored with the rest of the form... how do i accomplish this?
I've just created my first web application project.Now I want to add a RESTFul service.It can be pretty simple, all I need is to pass 1 string (userid) and 1 integer (objecttype) and return a json result.
I'm just curious that how a month is calculated in the rest of the world because Differences in Months between two dates are calculated differently. In our Insurance Company, we calculate a month as below:
I found this code on here while doing a search and would like to be able to use it but it was written in C and I dont know much about that (don't know that much about VB.NET either but trying to learn)[code]What I do have is a text box where a user enteres a desired number of US dollars to convert to three types of currency.I know how to convert the string entered to an integer so the calculation can take place. What I don't know how to do is modify the above code so that the results will show up in the correct text boxes after each calculation (yes I know I have to convert the integer back to text).If someone could show me how to do the first Select Case I can figure the rest out.
I have the following controller actions: <HttpGet()> Function News() As ActionResult End Function <HttpGet()> Function News(ByVal id As Integer) As ActionResult End Function
I want it to be smart, and go to the first if I have no ID in the url, and the second if there is. I got the following error: The current request for action 'News' on controller type 'MarketsController' is ambiguous >between the following action methods: System.Web.Mvc.ActionResult News() on type TradeChaseMVC.MarketsController System.Web.Mvc.ActionResult News(Int32) on type TradeChaseMVC.MarketsController
So, I thought if i explicitly created routes without the id parameter optional, like this: routes.MapRoute( _ "Default2", _ "{controller}/{action}/{id}", New With {.controller = "Home", .action = "Index"}, New With {.action = "^[a-zA-Z_]+$", .id = "d{1,8}|"} [Code] .....
It would work, but it doesn't same error. Now I know the simple solution is to call my methods different things, but i don't want to do this. I was also thinking of creating an attribute to prefix the ID method, to check for ID being there, and if it isn't dont allow that method, but I can't get this to work either.
This is what I am trying but it doesn't work. The idea is to rest the caret position at the beginning after I hit enter and the conents od Textbox1 are deleted
Private Sub TextBox1_Keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown If e.KeyCode = Keys.Enter Then
I've searched for a solution with no luck, can you help? I've a DataViewGrid with a DataGridViewComboBoxColumn, bound to a dataTable which all works fine but I need to undo the user selection in some cases.
When the user selects one of options I validate that the chosen option is appropriate for the rest of the row. I can do this in the CellValueChanged Event and easily determine if its good or bad - is this the correct event to do the check?
The problem I have is that I want to roll back to the default value in the DataGridViewComboBoxColumn if an invalid selection is made:
My project is like this. When I select from "TypeComboBox" and "BeanComboBox", the "PriceTextBox" will display the appropriate amount of the "Private PriceDecimal". But when I added the "Private SnackPrice", it will display only the 1st array, (0, 0) for both array. I try using "Select Case" but doesn't work. I don't know what the problem is. Or maybe it can't be done like this? One structure can have one array?
Private TransactionCoffeeSale(30) As CoffeeSale Private NumberTransactionsInteger As Integer Private SnackPrice(,) As Decimal = {{1D, 2D}, {3D, 4D}}
What is the best way to access a Rails 3 REST-ful web service, developed using standard Active Resource techniques including HTTP authentication over SSL, from a VB.NET consumer?Consumer can be .NET 4.0 if that is necessary.Are there any .NET libraries yet that can bridge the gap?
I have already come across links like this [URL]..web-services/), which use Linq.XML or XML.XPath to parse responses and generate post data for REST-ful web services. I have in fact coded a system similar to the one at that link, except for a different geo-coding provider and using XPath instead of Linq.
I am trying to write some code to serialize the XML returned by the Bing Maps REST location query. So far my code parses down to the "ResourceSet" level and then screws up. am trying to have the "ResourceSet" element parsed into an object of "LocationResourceSet", since this is a location query and the "ResourceSets" vary depending on the type of REST call
I have a web service with both SOAP and REST endpoints. I have to accept requests from a client that I do not have any control over on my REST endpoint. Currently the client gets a 400 response and the tracelog on my server shows this error:
The incoming message has an unexpected message format 'Raw'. The expected message formats for the operation are 'Xml', 'Json'.
I've tried everything I can think of with the WebContentTypeMapper but seem to end up right where I started every time. The request from the client doesn't appear to be well formed XML or JSON so if I try to force XML or JSON types from the WebContentTypeMapper I end up with parser errors.
So I guess I need to find out if I can force this endpoint to accept the message anyway.
I have a web service with both SOAP and REST endpoints. I have to accept requests from a client that I do not have any control over on my REST endpoint. Currently the client gets a 400 response and the tracelog on my server shows this error:The incoming message has an unexpected message format 'Raw'. The expected message formats for the operation are 'Xml', 'Json
I have found a few examples of this. basically instead of it watching only one folder, how would I have it watch any folder that's not named system32? I know I would need something similar to this: