|
Thank you. That was very helpful!
|
|
|
|
|
Hi all
i asking of how i can implement a network security based on IPsec protocol
thanks
|
|
|
|
|
Try Google for "IPsec security" and you should find some useful information.
|
|
|
|
|
Hello.
Thank you to put programs on the site Codeproject.com.
I command "AT Command" can recharge the SIM card can be self-abandoned.
Thanks.
|
|
|
|
|
I'm not sure what translator you used, but the English output is meaningless.
من مطمین نیستم شما چه مترجم استفاده كرد, ولي انگليسيها بازده بی معنی است.
(Translation provided by Babelfish.com)
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote:
من مطمین نیستم شما چه مترجم استفاده كرد, ولي انگليسيها بازده بی معنی است.
Translates back to;
"I'm not sure what you can use an interpreter, but the British, efficiency is meaningless."
(Translation provided by Google)
I are Troll
|
|
|
|
|
Eddy Vluggen wrote: I'm not sure what you can use an interpreter, but the British, efficiency is meaningless.
Sounds OK to me.
|
|
|
|
|
Hello,
I created a web service and i created also many classes below.
when i add it as a web reference, i can access all classes just one that contain public string variable is not shown ?
any suggestion !!
regards,
dghdfghdfghdfghdgh
|
|
|
|
|
Don't fully understand what you mean. Posting some code might help.
Webservices only expose methods, so fields won't appear in the proxy which is generated. Think of a webservice as a collection of functions, not as a class.
Regards,
Rob Philpott.
|
|
|
|
|
Hi Everyone..
Can u please guide me regarding reading each xml node...
My c# coding is as follows:
namespace ConsoleApplication2
{
class Class1
{
public string app;
public void perform()
{
OdbcConnection con= null;
con = new OdbcConnection();
ADIBCrypto.Encryption64 crpto = new ADIBCrypto.Encryption64();
string connString = crpto.GetCnnStr(ConfigurationSettings.AppSettings["appname"],ConfigurationSettings.AppSettings["dsnSybase"]);
con.ConnectionString = connString;
con.Open();
Console.WriteLine("Connection Opened Successfully");
Console.WriteLine("Enter the Application");
app=Console.ReadLine();
XmlDataDocument doc = new XmlDataDocument();
doc.Load(ConfigurationSettings.AppSettings["app"]);
XmlNodeList nodes = doc.GetElementsByTagName("Row");
foreach(XmlNode node in nodes)
{
if(node.HasChildNodes && node.ChildNodes.Count > 0)
{
string a_ID = node.ChildNodes[0].InnerText;
string a_ApplicationDescription = node.ChildNodes[1].InnerText;
string a_Category = node.ChildNodes[2].InnerText;
string a_Business_Owner = node.ChildNodes[3].InnerText;
string a_CreatedID = node.ChildNodes[4].InnerText;
string a_CreatedTimeStamp = node.ChildNodes[5].InnerText;
string a_Status = node.ChildNodes[6].InnerText;
if(a_ID==app)
{
Console.WriteLine("{0}",a_Category);
Console.ReadLine();
}
}
}
}
static void Main(string[] args)
{
Class1 cc = new Class1();
cc.perform();
}
}
}
And my XML file is :
<Row>
<ID>TestApp01</ID>
<ApplicationDescription>Test App 01</ApplicationDescription>
<Category>CM</Category>
<Business_Owner></Business_Owner>
<CreatedID></CreatedID>
<CreatedTimeStamp></CreatedTimeStamp>
<Status>A</Status>
</Row>
<Row>
<ID>TestApp02</ID>
<ApplicationDescription>Test App 02</ApplicationDescription>
<Category>CM</Category>
<Business_Owner></Business_Owner>
<CreatedID></CreatedID>
<CreatedTimeStamp></CreatedTimeStamp>
<Status>A</Status>
</Row>
As of now there is no problem.. when i compile it asks the app name, as i give my app name it browses thro the xml file
and returns the corresponding Category..
but what my question is if in the xml file the node order is changed i.e. if the category which is present in the xml file in child
node index 2 is changed
to any other index then my application goes wrong.. so instead of using the index number can my application check the child
node by its name instead
of the index number check.. please help me out in this matter one of my fren said that in this case
we can use xpath instead of checking for index..
but im not sure how to code using xpath.. please guide me...
Thanks in advance...
Regards,
Tash
|
|
|
|
|
Sure, all looks good, but as you say you can't really access nodes by their ordering, as they may not come in that order or one might be missing.
From a node, you can ask for child nodes with xpath as mentioned.
Something like:
foreach(XmlNode node in nodes)
{
string a_id = GetChildValue(node, "ID");
string a_ap = GetChildValue(node, "ApplicationDescription");
....
....
}
private string GetChildValue(XmlNode parentNode, string nodeName)
{
XmlNode node = parentNode.SelectSingleNode("/" + nodeName);
if (node == null) return null;
return node.InnerText;
}
That might not be quite bang on, but its close. Hope that helps.
Regards,
Rob Philpott.
|
|
|
|
|
Thanx 4 ur reply... I have come up with the following code..
its working fine.. Is this the right and
error free way for my solution???? Please advice....
foreach(XmlNode node in nodes)
{
if(node.HasChildNodes && node.ChildNodes.Count > 0)
{
XmlElement Element = (XmlElement) node;
string a_ID = Element.GetElementsByTagName("ID")[0].InnerText;
string a_ApplicationDescription = Element.GetElementsByTagName("ApplicationDescription")[0].InnerText;
string a_Category = Element.GetElementsByTagName("Category")[0].InnerText;
string a_Business_Owner = Element.GetElementsByTagName("Business_Owner")[0].InnerText;
string a_CreatedID = Element.GetElementsByTagName("CreatedID")[0].InnerText;
string a_CreatedTimeStamp = Element.GetElementsByTagName("CreatedTimeStamp")[0].InnerText;
string a_Status = Element.GetElementsByTagName("Status")[0].InnerText;
if(a_ID==app)
{
Console.WriteLine("{0}",a_ID);
}
}
}
Thanx in advance..
Regards,
Tash
|
|
|
|
|
I think it's ok in principle - only issue might be if one of the settings is missing, in which case GetElementsByTagName may return a null or an empty array (don't know, not used this method before). If this happens, then the '[0]' will throw an IndexOutOfRange exception. Consider adding a null check before just grabbing item 0.
Regards,
Rob Philpott.
|
|
|
|
|
my problem has changed a bit i created datatable and bind that to report viewer just as we bind something to gridview but i cant see anything on running application and there is no error.
|
|
|
|
|
IF there is error, describe what kind of exception is thrown
|
|
|
|
|
no there is no error..but no data is shown in report viewer.
|
|
|
|
|
I Had simular problem using Crystal Reports. The problem on mine side was that I did not assign data source programatcly
|
|
|
|
|
i have created a datatable programatically and populated it with some data.nw i want to bind it with report viewer to show that data.plz guide me hw can i do that?
|
|
|
|
|
|
Please post your question in the ASP.NET forum[^] and delete this post.
/ravi
|
|
|
|
|
So ive got a bitmap image of say size 1000*500 and use it as the background image of the form with layout property set to Stretch, now if user clicks on the form i want to be able to get the pixel postion of original image and not the x/y of the form beacuse that image is stretched?
is this even possible?
|
|
|
|
|
You can't, if the image is being displayed smaller then it really is as a background, it has only has as many pixels as the form does. A pixel is a uniform size. See this if you don't get what I'm saying.
modified on Saturday, December 19, 2009 8:46 PM
|
|
|
|
|
I get what you are saying, but i thought we could solve this by doing some math, which i completely suck at
I have seen some vnc client do something similar to this, it has an option to autoscale/stretch the client view to any size but yet it can translate the current mouse location to original screen coordinates
|
|
|
|
|
One thing to consider would be figuring out what percentage into the image the position is horizontally and vertically and then placing the point at the same percentage in on the larger image. not 100% sure it will work but it works in my head at least.
|
|
|
|
|
I did a quick test and it wasnt able to get the exact pixel but it works much much better then my own formula,atleast im little cloesr to my goal now
Thanks for your help
|
|
|
|