|
Please help me out with this problem using C# programming:
using my method(GetData) , i have to locate and read an xml file.After reading from the file,i have to search the value of an element in that file.
Then i have to get the data corresponding to that element value in string format.This data will also include the type of value object.Then deserialize that string into valueobject.Return the valueobject.
kindly mail the solution to my mail id saptarshi_basu@infosys.com as i dont have internet connection.
|
|
|
|
|
Hi,
I need to send a request to a server (a XML file or stream) and recieve a response to that request.
Now I know that there are WebRequest (or HttpWebRequest) and WebResponse, but with them I can only use e.g. WebRequest.Create("http://www.google.com") and recieve the response.
What I need is where I can specify the URL, send data to that URL and recieve a response.
Can anyone help me?
Regards
|
|
|
|
|
You specify the url when you create the WebRequest object.
The data that you send has to be a proper request, in order for the server to recieve the data at all. Send the xml as a value in a field in the form data in the request.
The response that you recive from the WebRequest will be exactly what the server returns.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote:
Send the xml as a value in a field in the form data in the request
Sorry for the stupid question, but how do I do this? I can't find any proper functions in WebRequest for putting values to the request...
Regards
|
|
|
|
|
The GetRequestStream property returns the stream object that will be used to send the request stream. Put a key in front of the value and htmlencode it.
theStream.Write("code=" + Server.HtmlEncode(theXml));
---
b { font-weight: normal; }
|
|
|
|
|
Ok, that worked. Thank you
|
|
|
|
|
plz help me how to add comboBox in datagird.
|
|
|
|
|
|
|
Hi,
I want to get content of an url web page. Before, I used xmlhttp activex control in Javascript and could get it easily.
Like this:
<script language = javascript><br />
function getData()<br />
{<br />
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");<br />
xmlHttp.open("GET", "http://search.yahoo.com/search?p=abc", false);<br />
xmlHttp.send();<br />
xmlDoc=xmlHttp.responseText;<br />
document.write(xmlDoc);<br />
}<br />
</script>
Now, I want to do this in C#, what dll should I add in to my project, also how will I use it?
Thank alot.
Cheers.
|
|
|
|
|
hi
how do i make sure that user cannot create New Customer Profile if there's already one in Access database?
thanks
|
|
|
|
|
hi there,
That depends on which field(property) need to be checked for duplicate.
Assume that each customer has his id and the id must be unique in whole system. So that before creating a new customer, ur application will validate the id if it's already existed or not.
<< >>
|
|
|
|
|
yes, yes.. that's what i want to do (to check if that id is already in my database) how do i do that?
also, how to check for repeated data just based on three particular fields though i've other fields in that row... that means if 1 or 2 of the particular fields are repeated data, it's not considered as duplicates. but if all three of the particular fields have repeated data, it IS duplicate and how can i prevent that??
lastly, how to check for repeated data if based on all fields on a row?? meaning, all fields are the same then it's considered duplicate.
thank you for your time! =)
|
|
|
|
|
hi there,
ur question can be devided into 3 parts:
nidhelp wrote:
check if that id is already in my database
=> to validate: just execute "select id from customer where id= m_sID". If the returned result is not NULL, that means it's duplicated
nidhelp wrote:
if all three of the particular fields have repeated data
=> the similar thing u need to do:
"select id from customer where field1 = field1Val and field2 = field2Val and field3=field3Val"
nidhelp wrote:
if based on all fields on a row
=>similar to the second one with all fields need to be verified in WHERE clause
Happy programming
<< >>
|
|
|
|
|
I've a strange question: how to get the handle of the window that is behind my app's window and in a specific point.
Is it also possible to get the name of the Win32 control (I mean the UI control), if there is one, in that point?
Thanks
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
Look at this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getforegroundwindow.asp
You can use the Spy++ tool in Visual Studio to get the lpClassName.
You could also use this tool:
http://www.codeproject.com/dialog/windowfinder.asp
|
|
|
|
|
I want to add an arrow cap to a line. So I use pen.EndCap = LineCap.ArrowAnchor. But the arrow is so small. How can I add a larger one? I try to use CustomLineCap, It is so troublesome and I failed.
Any advice?
Regards!
Radic
|
|
|
|
|
AFAIK CustomLineCap is the only way. I know it is difficult to get it working.
Maybe you can try to draw *manually* the arrow by filling a Shape.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
I thought the manual way. But you know the slope of the line changes sharply and the arrow has to change. So it needs much calculation work and I doubt if the effect is good.
Radic
|
|
|
|
|
Another RAW way:
1. draw the line only (without arrows)
2. apply a scale to the Graphics object (ScaleTransform)
3. Draw a short line (few pixels long) with the default arrow cap.
you should try and try to get the correct scale and 2nd line's length.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
In what way is the CustomLineCap class troublesome? I think that it probably is the easiest way to do it, so any other method would be even more troublesome.
---
b { font-weight: normal; }
|
|
|
|
|
Any easier way? Before you construct a CustomLineCap, you need construct GraphicsPath, FillMode, etc, which, I think, is troublesome. Will you be kind enough to show me an easier way? Thanks, thanks, thanks!
Radic
|
|
|
|
|
yeah, I have a datagrid control on a form. How do I do a simple binarysearch on the table so I can select the row that results were found in. thanks. also, is there a way I can make rows invisible so they still exist, but aren't visible? thanks so much.
Stephen
also, in this datagrid, I'm displaying id3 information about mp3's using a library I found online. it works well, but when I display the information it outputs in the datagrid, I get many of these strange symbols that look like a square. I exporte dthe datagrid as an xml file and found the squarex to be represented by & # x 0 ; minus the spaces. I can also paste this sequence here without spaces and it will show the odd symbol: . I read somewhere that this is represents null characters. However, tooltips on the datagrid show the proper contents of the cells, just the actual cells contents have those weird symbols. any ideas? thanks
-- modified at 22:42 Wednesday 7th September, 2005
|
|
|
|
|
Hi Buddy, I am also looking for this kind of information. So if you found any help please tell me.Thanx
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
Here's the code..... If anyone can tell me how to get the form to erase the previous line when I click the ok button. I'd appreciate it. Each time I click the "OK" button it just draws line after line w/ out erasing the previous line....thanks...
///////////////////////
//BLOCK 1:
private void complexA_OK_Click(object sender, System.EventArgs e)
{
Graphics g = this.CreateGraphics();
Pen cmplxAPen = new Pen(Color.Crimson);
//
try
{
double valAReal;
double valAComplex;
valAReal = Convert.ToDouble(this.textComplexAReal.Text);
valAComplex = Convert.ToDouble(this.textComplexAComplex.Text);
DrawComplexNumber(g, valAReal, valAComplex);
}
catch
{
MessageBox.Show("Invalid Complex A Number", "Error!");
}
}
///////////////////////////////////////////////
//BLOCK 2:
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
DrawGraphRectF(e.Graphics);
DrawXYAxes(e.Graphics);
DrawGraphXandYTicks(e.Graphics);
}
///////////////////////////////////////////////
//BLOCK 3:
void DrawComplexNumber(Graphics g, double re_, double im_)
{
Pen cmplxPen = new Pen(Color.DarkGray, 4);
g.DrawLine(cmplxPen, (xIndent + graphRect.Width/2), (yIndent + graphRect.Height/2), (xIndent + graphRect.Width/2) + (float)(re_ * xIndent), (yIndent + graphRect.Height/2) - (float)(im_ * yIndent));
//Pen cmplxEraseLinePen = new Pen(Color.Snow, 4);
//g.DrawLine(cmplxEraseLinePen, (xIndent + graphRect.Width/2), (yIndent + graphRect.Height/2), (xIndent + graphRect.Width/2) + (float)(re_ * xIndent), (yIndent + graphRect.Height/2) - (float)(im_ * yIndent));
}
[Reply][View Thread][Get Link] [Modify|Delete
|
|
|
|