I am trying to post data from vb.net application to web service asmx that is located on server!
For posting data from vb.net application I am using this code:
Public Function Post(ByVal url As String, ByVal data As String) As String
Dim vystup As String = Nothing
Try
'Our postvars
Dim buffer As Byte() = Encodin...
We have legacy character codes that we want to store as numbers in a new system. To increase readibility and general understanding in the code for devs making the migration, I want to do Enums like this...
Public Enum Status As Short
Open = AscW("O")
Closed = AscW("C")
Pending = AscW("P")
EnRoute = AscW("E")
End Enum
W...
The title says it all.
Since, it's possible for anyone to name an assembly starting with 'System', checking for 'System' is not a satisfactory solution.
Alternatively, if that's not possible, how about checking the modules in an assembly?
...
I'm attempting to use business objects as a datasource for an ASP.NET Microsoft rdlc Report and I am having problems displaying the values of subobjects in the report.
For example, if have the following two classes 'Customer' and 'Address'.
Customer
FirstName
LastName
Address
etc.
Address
HomeAddress1
etc.
...
I've just started out fiddling with WPF in Expression Blend and now I'm trying to design a "normal Windows GUI" interface with a menu at the very top and some other stuff which takes up the rest of the window.
Which panel do I use to make the menu always stay at the very top, take up only as much height as it needs to fit the menu items...
I came across the following code recently and would like to optimize it:
Public Shared Function ComputeLabel(ByVal Action As Integer, ByVal Flag1 As Boolean, ByVal Flag2 As Boolean) As String
Dim Prefix As String = ""
If Flag2 Then
Prefix = "Conditional "
ElseIf Flag1 Then
Prefix = "Held "
End If
Select Case...
How do I determine a mapped drive's actual path?
So if I have a mapped drive on a machine called "Z" how can I using .NET determine the machine and path for the mapped folder?
The code can assume it's running on the machine with the mapped drive.
I looked at Path, Directory, FileInfo objects, but can't seem to find anything.
I also l...
Any time I make a change to a type converter or editor, I have to close down my visual basic 2008 express ide and restart it.
If i don't restart, the following problems occur:
(1) The designer shows what appear to be random errors. I solve this by running the app, so not a real problem there.
(2) Serialization of design time propertie...
I am trying to open a file from a server
I currently have
Dim attachedFilePath As String = "\\myserver\myshare\test.txt"
File.Open(attachedFilePath, FileMode.Open, FileAccess.Read, FileShare.Read)
This does not open a file.
However, if I change the path to be local then there is no issue.
Dim attachedFilePath As String = "c:\...\t...
We have some reports that are failing when two of them are executed very close together.
I've found out that if two instances of an SSRS report run at the same time, any Code variables declared at the class level (not inside a function) can collide. I suspect this may be the cause of our report failures and I'm working up a potential fi...
I have some broken links on my site, and will keep having new ones on regular basis. How do i write a centralized code in web.config or something for 404 then redirect to home page?
I am using aspx, vb.net and IIS7
...
This is a VB .NET application where we are showing the output of a SQL statement in a Datagrid view. using .NET 2005.
We need to get the seperators of the headers on the grid control to be the same colors as the GridColor on the form. See the picture below:
We've tried looking through all of the properties of the DataGridView contr...
I have .net code that works on IE8 but wont work on google chrome or firefox. i have put this code for the user to press Enter instead of clicking the mouse everytime.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Not IsPostBack Then
//-- my code --
...
hello
i've been starting some work with winAPI - Vb.net
i'm using FindWindow and FindWindowEx but i'm having weird value when trying to get the handle of a control
(right now i'm just trying to get the handle of button1 in my form .. economizing my ambitions :D)
http://pic.leech.it/i/6ee4b/80a2540150133418.png
but you can see that hCt...
I have a nvarchar(256) field in a SQL 2005 database table that contains several records in Chinese and I'd like to output this characters correctly in VB.NET code.
What I have now doesn't work at all:
Dim MyText As String = "推荐评论: 属于那~种类型的电影"
Dim value As [String] = MyText
Dim tc As Encoding = Encoding.GetEncoding(950)
Dim bytes As Byt...
I have written a program in .NET that listens to a particular Serial Port and processes the data that is being received. I wrote a test program using serialport control and my program was working fine.
When i run our program in Windows Mobile with the original device, the data received was garbled. The same device when connected with PC...
Hi,
In Form1 i have a Textbox1, in this textbox i have the loaction of a file "C:\folder\file.iso"
In the Form2 i want to get the file size of the file in Textbox1 so i tried this
Dim fileDetail As IO.FileInfo
fileDetail = My.Computer.FileSystem.GetFileInfo(Form1.Textbox1.Text)
Label1.Text = Size: fileDetail.Length
...
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack = True Then
Session("x") = "ABC"
End If
End Sub
Protected Sub btnABC_Click(ByVal sender As Object, ByVal e As System.EventArgs) Han...
Is it possible to find POP3 server address for any given email id (like [email protected])? If yes, please provide some guidance preferably in PHP or .Net.
Edit :
I get addresses by querying MX record but those are not always the same which people use to fetch their emails.
...
Hello,
I want to format my textbox in a way so that, user cant enter any symbol e.g () , . ; ' " £ $ % ^[]{}
If (Char.IsDigit(e.KeyChar) Or Char.IsControl(e.KeyChar) Or (e.KeyChar = ".")) Then
e.Handled = True
End if
This code will prevent user from entering digit or integer. But how can I prevent symbols?
Thanks in...