|
Hi,
I am developing a wpf application. i want to upload the images from client location to server(www.xxxx.com/Images/image1.jpg) location. Let me if any samples.
Thanks.
|
|
|
|
|
There are many samples showing how to do this. What you're looking for is a web service sitting at the server end (I'm sure you can find these), and a reference to that service in your WPF code. Again, you should be able to find millions of references to this on Google.
|
|
|
|
|
httputility.HtmlEncode in not declared
VB.2008 Windows App, I see plenty of references to htmlEncode but getting it declared seems to be an issue.
Imported System.Web and Xml and Net, etc but just cannot to httputility.HtmlEncode
What am I missing?
|
|
|
|
|
Have you added a reference to the System.Web assembly, or just imported the System.Web namespace? (You'll need to do both.)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Original just imported. Added System.Web to Imported Names spaces but did NOT help.
If I put in system.web. httpUtiltity does NOT appear. Only get 3 options AspNetHostingPermission,AspNetHostingPermissionAtribute, and AspNetHostingPermissionLevel.
|
|
|
|
|
The System.Web namespace exists in multiple assemblies. The System.Web.HttpUtility class only exists in the System.Web assembly.
You will need to add a reference to the System.Web assembly before you can use the System.Web.HttpUtility class.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
HttpUtility is in System.Web.dll. Add a reference to that .DLL (the correct version for the .NET Framework you are targeting!!) then import the namespace at the top of your code file.
If you're using C#, it's case-sensitive. httpUtility does not = HttpUtility .
|
|
|
|
|
Thanks Dave. That did it. I removed the names space which was causing and conflict. It now works.
It is VB. I hate languages that are case sensitive.
|
|
|
|
|
I have designed a keyboard using vb.net but this keyboard is typing only in my application textbox.when i open notepad and press the buttons in my application the character is not displayed in notepad
and it is displayed only in my textbox.But "windows" onscreenKeyboard is doing correctly.Is there Any suggestions To solve This Problem.......
Here Is The Code:-
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = TextBox1.Text + "A" 'Button 1 Is assigned With character A
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = TextBox1.Text + "B" 'Button 2 Is assigned With character B
End Sub
|
|
|
|
|
Iam using keypress event in vb.net and i have assingned values for some of the keys but when i press the key,the assigned value and the pressed keys value both are displayed in the screen.I am unable to solve this problem.Help me guys.............
If i press semicolon ";A" is displayed
Here Is the code:-
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
If Asc(e.KeyChar) = 59 Then 'Ascii value of semi-colon
TextBox1.Text = TextBox1.Text + "A"
End If
If Asc(e.KeyChar) = 32 Then 'Ascii value of space Bar
TextBox1.Text = TextBox1.Text +"B"
End If
End Sub
modified 24-Sep-13 11:03am.
|
|
|
|
|
If you changed the text you need to set e.Handled to true so that the operating system doesn't process the character. You would put this statement inside your if's.
|
|
|
|
|
Ya It Worked Nicely.....
but my cursor is always at the starting point.i have pressed semi-colon for 9 times even then the cursor is at the starting point only and not moving to the end.
|
|
|
|
|
You should use AppendText and to make the carat move to the end you can do this:
If Asc(e.KeyChar) = 59 Then
TextBox1.AppendText("A")
TextBox1.SelectionStart = TextBox1.Text.Length
e.Handled = true
End If
|
|
|
|
|
It Worked Out Exactly
The Cursor Is Moving Along The Text But After Pressing "Semi-Colon" & "Space",I Moved The Cursor Between
"A & B" and again i Pressed "Semi-colon" but A Is Displayed At the End And Not Between A &B.
modified 25-Sep-13 11:40am.
|
|
|
|
|
If you want it to insert the character at the current carat position, do this:
If Asc(e.KeyChar) = 59 Then
Dim selPos as Integer = TextBox1.SelectionStart
TextBox1.Text = TextBox1.Text.Insert(selPos, "A")
TextBox1.SelectionStart = selPos + 1
e.Handled = true
End If
|
|
|
|
|
The Character Is Inserted Between them,but the scroll bar is automatically scrolling to the top of the page.
|
|
|
|
|
...
If Asc(e.KeyChar) = 59 Then
Dim selPos as Integer = TextBox1.SelectionStart
TextBox1.Text = TextBox1.Text.Insert(selPos, "A")
TextBox1.SelectionStart = selPos + 1
TextBox1.ScrollToCaret()
e.Handled = true
End If
This may cause the scroll position of the textbox to change, this is unavoidable without using some interop methods to scroll back to exactly the same position. The ScrollToCaret only ensures that the caret is positioned in the visible region of the control.
|
|
|
|
|
can anyone post a code which can not be uninstalled when the program is running by C# custom install option
|
|
|
|
|
There is no way to stop uninstallation of a program. You can write on the drive, registry etc, but a file can still be uninstalling by deleting these entries.
|
|
|
|
|
For some domain smtp is working fine but for some emails its showing Mailbox unavailable. The server response was: <xyz@testdomain.com>, Recipient unknown .
Please could any one able to help me . Its urgent.
Thanks in advance.
|
|
|
|
|
I'm not sure what you want us to help you with. When you get the message "Recipient unknown", it's telling you that the email address you're trying to send the email to doesn't exist or that there's a problem with the recipient configuration that prevents you getting access to them. As this is a problem, effectively, at their end there's not a lot you can do.
|
|
|
|
|
My problem is only that some users are not receiving emails because for them its showing error(Recipient unknown)and rest are receiving the emails.
Is there is any way that they also start getting the emails.
|
|
|
|
|
Go and ask them to check. The only thing you can do is to ask them to verify their email address.
Veni, vidi, abiit domum
|
|
|
|
|
Guys I have made a convertor that converts a decimal number to a octal number in VB.NET,but it converts only upto 7 digits of decimal number to Octal.If it exceeds 7 digits "Memory Overflow" message is displayed.How To solve this problem guys?
Here Is The Code:
Dim s1,s2 As string
Dim i1,i2 As Integer
s1=textbox1.Text
i1=Convert.ToInt64(s1, 10)
s2=Convert.ToString(i1, 8)
i2=Convert.ToInt64(s2, 8)
but this code is limited only up to 7 characters of input.
modified 24-Sep-13 11:01am.
|
|
|
|
|
Well look at these two lines:
Dim i1, i2 As Integer
i1 = Convert.ToInt64(s1, 10)
What is happening here is that you are sticking an Int64 into an Integer. It can handle a certain number of "characters" (actually numbers) because after that number it overflows. You need to declare i1 and i2 as something that can hold large numbers, something like maybe Int64... Integer is an Int32 by default.
|
|
|
|