|
Any light shed on this problem would be greatly appreciated. I am trying to consume a webservice from a C# windows application using a webClient. I am passing a string formatted XML via a webClient.UploadValues in the values. When i try to access the webservice i am not getting access and instead am getting dumped out with a Internal Server Error 500
|
|
|
|
|
That means that the server returned the error code HTTP 500 as there was an error when the web service was executing.
Is the XML that you are sending a proper SOAP message? Browse to the url of the web service to see an example of what the service is expecting.
---
b { font-weight: normal; }
|
|
|
|
|
What is being passed is a string built from an XML document which has been read from an upload. This string does not contain a SOAP header but overloaded method exists to handle different input types (including a string) to the same webservice. The webClient call isnt getting as far as the webservice i suspect as the server is returning the 500 error. I've been looking online and see lots of reference to IIS settings. Have you encountered anything like this at any time???
Sorry i cant be any more informative than this.
System.Collections.Specialized.NameValueCollection values = new System.Collections.Specialized.NameValueCollection();
values.Add("StringXmlInstruction",XMLTextFeed);
Console.WriteLine(XMLTextFeed);
byte[] btResponse = webClient.UploadValues("http://dev003/lmsHIPInstruction/instruct.asmx", "POST", values);
|
|
|
|
|
Hello all, I am trying to add several items to a dropdown menu and have hit a brick wall.
I have a list of people and I am trying to add a button for each person into the dropdown menu. But I can't get it to work. Any help or ideas?
Also how do I add an event to each button so I can get it to do something when I click on it?
Thanks in advance,
Phil
"Rules are for the obedience of fools and the guidance of wise men"
|
|
|
|
|
Phillip Hodges wrote: But I can't get it to work.
What does that mean? Show the code you've got till now, so we have an idea how far you've come and what still needs to be done or changed.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
mycombo.Items.Add("SomeText");
and just doubleclick the button in your designer.
Hope this helps.
|
|
|
|
|
Have a look at Link Buttons. If the list of names is done on the fly add a unique ID to each LinkButton. This should help if i have got the idea of what you are asking
LinkButton yourButtonName = new LinkButton();
yourButtonName.Command +=new CommandEventHandler(yourButtonName_Click);
private void yourButtonName_Click(object sender, CommandEventArgs e)
{
}
tlab
|
|
|
|
|
I think you might want to reply this to Phillip Hodges who is in need of this answer :->.
|
|
|
|
|
Sorry my bad, Is that my brain sleeping? I think it is!
|
|
|
|
|
Have a look at Link Buttons. If the list of names is done on the fly add a unique ID to each LinkButton. This should help if i have got the idea of what you are asking
LinkButton yourButtonName = new LinkButton();
yourButtonName.Command +=new CommandEventHandler(yourButtonName_Click);
private void yourButtonName_Click(object sender, CommandEventArgs e)
{
}
tlab
tlab
|
|
|
|
|
Dear all,
If for example I am trying to make a custom folder explorer (to display PSP film names correctly) and I am using a TreeView to display the folder hierachy.
Is it possible to access the system icons for example the currently used Folder icon from the Shell to use??
Many thanks
Paul
ps VS2005 and C#
|
|
|
|
|
for getting file icons you need to use shell APIs. you can use the following snippet.
[StructLayout(LayoutKind.Sequential)]
public struct SHFILEINFO
{
public IntPtr hIcon;
public IntPtr iIcon;
public uint dwAttributes;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
};
class Win32
{
public const uint SHGFI_ICON = 0x100;
public const uint SHGFI_LARGEICON = 0x0;
public const uint SHGFI_SMALLICON = 0x1;
[DllImport("shell32.dll")]
public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
}
IntPtr hImgSmall;
string fName = "c:\\getfileicon.cs";
SHFILEINFO shinfo = new SHFILEINFO();
hImgSmall = Win32.SHGetFileInfo(fName, 0, ref shinfo,(uint)Marshal.SizeOf(shinfo),Win32.SHGFI_ICON |Win32.SHGFI_SMALLICON);
System.Drawing.Icon myIcon = System.Drawing.Icon.FromHandle(shinfo.hIcon);
imageList1.Images.Add(myIcon);
I think this code would be helpful.
Saqib
|
|
|
|
|
|
Hi,
Can anyone help me to change the display name of a property outside the class (ie)in some other class with or without the help of attribute.
Thank you,
regards
Praveen
|
|
|
|
|
Can you elaborate your question in detail.
|
|
|
|
|
hi,
Sorry for the delay , this is my question how can i changethe display name of a property outside the class , as of now i can change the name using attributes but those are done in same class as the property lies.
eg.
class a
{
[displayname("hello")]
property 1{ get{;} set{;}}
}
this is how iam changing it now
but i need to change the display name in some other class (eg) in class
"b" how can i do it.
Thank you,
Regards
praveen.
|
|
|
|
|
Dear all,
i have developed a multilingual application using C#.NET in VS.NET 2003.
Here i am using the resource files to get the required data based on the selected Culture.
The display details are perfect for labels, buttons, richtext boxes etc...
But, in the text boxes, messages boxes, Display name of the form & menu names only squares are displayed for some special characters based on the selected culture.
Did anyone face the same problem. Kindly guide me to achieve the same so that i can display the details based on the selected languages/cultures in all the controls
Best regards,
Abhilash
|
|
|
|
|
Probably font of textbox and messagebox dont support unicode. Have you checked that out?
|
|
|
|
|
thanks for ur suggestion..
but how to check it? & is it possible to make textbox, messagebox & menu items to support unicode?
a per my observation, they are acting as notepad. not supporting rich text.
i copied the same special chaacters in txt & rtf files. In rtf file, the characters are displayed pefectly. But, in txt file, they are displayed as squares, same as in textbox, messagebox & menu items.
|
|
|
|
|
Cope the text into Notepad - find a font that does display them. Obviously I assume you HAVE installed asian/script font support - and rebootet the system. People tend to skip the reboot because for exampel IE does not seem to need it - but WinFrom applications requires it.
Once you have a font name, try setting that on your controls (it really should not be needed on the messagebox (nor is there an easy way to do it), unless someone has overridded the default font setup to a font without support.
|
|
|
|
|
Are there a way how you can combine two data columns in a listbox
in Asp.net and set the background color for the main column,
for example the two columns are Town and Suburb, I am trying to combine
them with the main Column "Town" and then his Suburbs and then the second Town and then his Suburbs like the following
Town1
Suburb1
Suburb2
Suburb3
Town2
Suburb1
Suburb2
Suburb3
Town3
Suburb1
Suburb2
Suburb3
Please help I went through a few Sql books already.
Samuel G
|
|
|
|
|
Hello!
I´ve got a problem with users losing the ability to view controls when their video resolution settings are set to a low resolution. The program is optimized for 1024*768, and when a user has for an example 800*600, some controls disappear. I´ve tried with making scrollbars appear in a situation like this with the property autoscroll set to true, but it doesn´t help. Anyone got a suggestion what I should do?
/Regards
|
|
|
|
|
let the users change for 1024*768
|
|
|
|
|
your form's height and width should not more than 800x600
|
|
|
|
|
Yes that is one solution, but as I said the application is optimized for 1024*768, which also 99% of users will have. I´d prefer a solution with scrollbars appearing. I´m currently experimenting with autoscrollminsize property.
|
|
|
|