|
|
Hello Kumar,
I am not sure what you mean by "a Web-service". Could you be more specific, please?
Thank you so much for the input, mate.
Khoramdin
|
|
|
|
|
I'm not quite sure if I understand. Do you want to take the PHP file and put into a datagrid? Or do you just want to display it as a website? (I don't know what a PHP file is) To open it you can do this....
<br />
Filestream file = new Filestream(YourPHP.PHP);<br />
StreamReader sr = new StreamReader(file);<br />
string s = sr.ReadToEnd();<br />
sr.close();<br />
file.close();<br />
But you don't do that if you just want to display it in a WebBrowser.
Hope this helps, but if not, let me know.
|
|
|
|
|
You can put a webbrowser control into your site and just point the URL to your PHP site. A web service is a program that passes data over the web, not through pages, but as XML. Google will tell you more.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello Christian,
Thanx for the reply. That is exactly what I am doing as I placed a webbrowser control in the Windows Application which is pointing to my php file. Now I have the executed php file displayed in the webbrowser control, containing the information "data" that I need to have available in the Windows Application as variables.
How on earth I can get the displayed data into the Windows Application and use those variables in the C# programing?
Thank you very much for your help.
Khoramdin
|
|
|
|
|
This discussion will have many interesting links for you:
Read Web Page .NET C#[^]
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
I have no idea.
Basically, I want to do the following:
1) get reference to whatever object has focus.
2) give another control focus.
3) do some stuff with control from 2)
4) give focus back to the initial object.
I don't know how to do 1) and 4), but I'm sure I could figure out 4), given 1) (but not vice-versa).
So - can anyone help me with 1)?
Thanks!
cdj
|
|
|
|
|
okay. The first one is probably going to be the hardest one to answer. I don't think the form has any methods or properties that tell you which has focus, but you could do a foreach statement which would look something like
<br />
public Control FocusedControl()<br />
{<br />
foreach (Control Ctrl in this.Controls)<br />
{<br />
if (Ctrl.Focused == true)<br />
return Ctrl;<br />
else<br />
return FocusedControl;<br />
}<br />
}<br />
}
I am not sure if it will let you return the focused control, in which case you could use a different iteration
<br />
public Control FocusedControl()<br />
{<br />
Control FocusedCtrl = null;<br />
Int FocusIndex = 0;<br />
while (FocusedCtrl == null && FocusIndex < this.Controls.Count)<br />
{<br />
if (this.Controls[FocusIndex].Focused == true)<br />
{<br />
FocusedCtrl = this.Controls[FocusIndex];<br />
}<br />
}<br />
return FocusedCtrl;<br />
I think either of those will work.
Then to give focus to an object all you need to know is which object you want to give focus to.
MyControl.Focus();
for number 3 I think you mean without knowing the name of it, which you can store in a variable of type Control. To access properties that most controls don't have, such as the url of a webBrowser, you can use
((WebBrowser)this.Controls[FocusIndex]).url = "http://www.codeproject.com";
and finally for number 4 you know how to "store" a Control in the Control variable, and all you have to do is go back to what you named the variable, and use the Focus() method.
Hope this helps.
|
|
|
|
|
For 3), I do know the name of it - there's no problem there. I included the whole sequence just to give the reader the problem-context.
I'd thought of polling every object with a focus property - if I can't come up with anything else, I'll do it. Obviously it's hugely inefficient.
Thanks for your thoughts!
cdj
|
|
|
|
|
Hi to all,
I need to create a little soap client on the http://api.eurocv.eu/euroserver.php wsdl.
Can anyone help me?
Thanks
M.T.
|
|
|
|
|
|
Thank you Vasudevan Deepak Kumar, I would like to create a website using EuroCv. Can you help me to start it?
The web service is here: http://api.eurocv.eu/euroserver.php
contact me by email if you are interested in it.
Best Regards
M.T.
|
|
|
|
|
Before I start, can I just say ARRRRRRRRRGHHHHHHHHHHHH!
Sorry about that, this has been doing my head in.....
I'm using a 3rd party COM object which they tell me returns "a DWORD defined as an unsigned long of four bytes".
According to MSDN, the correct way to represent a DWORD under .Net is as a Unit32 which is not CLS-compliant.
See this: http://msdn2.microsoft.com/en-us/library/ac7ay120.aspx
In one part of thier API, this value is split into 2 values. I am told that...
"The first 16 bits of the long becomes the first short, and the remaining 16 bits become the second short."
I'm not quite sure how to achieve the above.
They have used the operators >> and & in thier sample code. Having looked at their details on MSDN I am still n the dark.
I have addapted a sample and arrived at the following:
ushort argument1 =(ushort)(returnValue & 0xffff);
ushort argument2 =(ushort)(returnValue >> 16);
I am unsure if this is doing what I need, if so perhaps somone could explain what is happenning.
The only other idea I had was to convert the value into bits and then perform the required manipulation.
Any guidance would be much appreciated.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
<br />
ushort argument1 =(ushort)(returnValue & 0xffff);<br />
Returns the lower 16 bits more easily seen when written as
<br />
ushort argument1 =(ushort)(returnValue & 0x0000ffff);<br />
The next statement shifts the bits to the right 16 bits. thus 0xffaaffgg>>16 would then become 0x0000ffaa which is then already masked for you.
File Not Found
|
|
|
|
|
Although I don't really understand it, I thank you for your reply.
From your description however, it appears that it will do just what I need.
I apologise for my ignorance, I even looked up the operator on MSDN:
http://msdn2.microsoft.com/en-us/library/sbf85k1c.aspx
It reads.....
The & operator can function as either a unary or a binary operator.
The unary & operator returns the address of its operand (requires unsafe context).
Binary & operators are predefined for the integral types and bool. For integral types, & computes the logical bitwise AND of its operands.
For bool operands, & computes the logical AND of its operands; that is, the result is true if and only if both its operands are true.
I read that before my original post and unfortunately it makes no more sense to me after reading your reply.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
and Discrete Math go into the topics at depth. Basically 0xF is the hex representation of 1111 in binary (15 in decimal). 1111b (b for binary) << 4 = 11110000b which is 0xF0 in hex. 0xF0 | 0x0F = 0xFF (bitwise or), 0xF0 & 0xF0 = 0x00 (bitwise and). Also 0x0f & 0x01 = 0x01 (bitwise and)
I really can't go into it further because it can get fairly immense.
File Not Found
|
|
|
|
|
Thats a great intro, I am familiar with hex but didn't understand how the operator worked.
I will read up on Boolean Algebra and Discrete Math as you suggest. I would like to know more but understand that this is beyond the forum.
Thanks for your guidance.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
Greetings everybody,
I have a nice challenge:
I have a gridview and an objectdatasource on a webpage and I made this gridview invisible.
I need to use this gridview multiple times on one webpage with the same objectdatasource but the values of the parameters of the stored procedure differs from case to case.
I want to use a clone technique or something else to accomplsh this.
I need to use c# code.
Does somebody have a clue how I can accomplish this?
Thanks for every clue.
Greetings Peter Bellen
bellenp@schneider.com
|
|
|
|
|
What's to stop you simply creating the GridView manually rather than using the designer. Refactor that code out into a method called CreateGridView with parameters that allow you to pass through to the stored procedure. Then (I don't know the Web Forms equivalent) you can call:
this.Controls.Add(this.CreateGridView(paramater1, parameter2, ...));
this.Controls.Add(this.CreateGridView(parameter2, parameter3, ...));
|
|
|
|
|
I got some problem about send multiple parameter to crystal report. I already create parameter field with allow multiple value option, but when I look into preview windows in crystal report program. It'll prompt me to put multiple value, which is right, but when I entered two value, it only show me for one value. Ex, I entered "test1" and "test2" values, but in preview I only can see "test1". Please give me some guide!!!! thank you
|
|
|
|
|
Hello everyone,
I am working on an Windows Application writen in C# which gets connected to a remote Database server. I am trying to get the IP address of the use once they get connected to the database.
I am using the following code for getting the IP address:
string strHostAddress = "";
IPAddress[] addresslist = Dns.GetHostAddresses(strHostAddress);
foreach (IPAddress theAddress in addresslist)
{
MessageBox.Show(theAddress.ToString());
}
It works fine but the code returns the enternal IP address since my computer is sitting behind a routher.
I was wondering if it is possible to get the external IP address?
Thank you very much and have a great day.
Khoramdin
-- modified at 18:32 Monday 19th March, 2007
|
|
|
|
|
How about using an external service such as whatsmyip.org[^] to find out the router's IP address. Not to overload those servers it isn't to difficult to create a simple script or web page that you can host yourself to return the IP address of the computer making the connection.
|
|
|
|
|
Hello Ed,
Thanx for the info. I have spent a good deal to time and trying everything and it seems your suggestion is the only way to go about this.
Just wanted to say thank you and have a great day, mate.
Khoramdin
|
|
|
|
|
I would like to know what the recommended max length for a filename/path for Windows XP is...if there is one?
-- Thanks!
|
|
|
|
|