|
Hi All,
Please help me regarding a doubt. i have a .xml file which is having around 3000 nodes, now I want to retrieve the name attribute of those nodes for which store attribute>30. Please suggest the esaiest way to do it.
Thanks,
Inder....
|
|
|
|
|
Load the xml with the XmlDocument and use xpath to get the nodes. Iterate those nodes the read the attribute.
Example:
<code>
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("XMLFile.xml");
XmlNodeList selectedNodes = xmlDoc.SelectNodes("//Store[@Stores>30]");
foreach (XmlNode item in selectedNodes)
{
Console.WriteLine(item.Attributes["name"].Value);
}
Console.ReadLine();
</code>
My xml file:
<?xml version="1.0" encoding="utf-8" ?>
<Stores>
<Store name="Name1" store="10"/>
<Store name="Name2" store="20"/>
<Store name="Name3" store="30"/>
<Store name="Name4" store="40"/>
</Stores>
|
|
|
|
|
Don't cross post! You have already asked this question in the C# forum, which is more appropriate than the ASP.NET forum but should have been placed in the XML forum
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi ,
We are developing a portal in asp.net (C#), where user can upload documents , We need to prevent the upload of Renamed files(the extensions changed Ex.xxxx.exe changed to xxxx.docx) , and Encrypted files(Password protected). Please advice .
Regards,
Nancy
|
|
|
|
|
You won't be able to detect whether a file name has been changed prior to upload. As for encryption, there are copious amounts of documentation covering that subject.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
One assumes you want to restrict the uploaded file types to a certian set - eg doc, docx, pdf.. whatever. So I would think it possible to examine the uploaded file/s (byte by byte) in the code-behind to at least check that its format is that of the supposed file type, according to its extension. Some research would be required to determine a reasonable test for each type, but I wouldn't have thought that that would be beyond the wit of man... or woman.
|
|
|
|
|
how do i debug when i am not getting back the querystring parameters from the browser to the server? thank you.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
what do you mean? you can't see your parameters in the querystring or it's not even there?
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
i am not receiving it on the server side. i am actually more asking of a debugging technique/tool.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
You can always manually type in the url with parameters to a browser. However, where is the request coming from? Is it from your own page? Then you need to determine why the query string is not being supplied.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
yes you're right that's what i'm doing is typing the url on the address bar with the query string. and it is my page. is fiddler something that would be useful in this situation? i'm talking about trapping the request/response.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
You are going to have to elaborate. Are you using Visual Studio? You can't set a breakpoint and inspect the query string?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hello All,
We have the following scenario.
1. In code behind page I have defined two Page Methods.
suppose Page Method 1 executes Add funtionality of two numbers. Page Method 2 executes Substraction functionality.
2. I want those two methods to execute at the same time in parallel. When the methods are called from JavaScript, they are called in sequential order. However, those two methods Add() and Subtract() should be called in parallel to improve the performance by getting the response quickly.
Can you please shed some light on this and help us to solve this issue.
Yours Raheem MA
|
|
|
|
|
Hi,
I have Siebel On demand web service wsdl, I want to consume Siebel OD web service in my .Net console application.
I want to update Siebel OD picklist from .Net client
I can implement this from below 2 ways.
1. Add web reference and VS will automatically create proxy class.
2. Dynamically create input soap message and pass soap message across with help web service extension’s
webrequest and webresponse methods.
Please advice which one of above process will be good in performance, scalable, lightness of invocation of web service.
Thanks,
Anurag
|
|
|
|
|
No Reply ...
|
|
|
|
|
I was just reading some article and there was an example regarding Cookies in ASP.Net. The example was using Request.Cookies.Add and I was like, Request is used to get something from client side, so this code is written incorrectly. But when I tried the code, it was a surprise for me to know that both exist and both does the same job. So I'm just wondering if someone out there knows the secret about this having Response and Request Add method for Cookies! Adios
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
hi guys
i create a mobile web site and i want to create a html table to show some things
first i used response.write("<...> " )
but not work
do you have any idea for this?
thanks a lot
|
|
|
|
|
I am new to ASP.Net programming and I have been learning about the various basics of creating a web app. I'm ready to try creating my own site but I'm not sure where to start. Should I start by creating the layout using CSS or should I start by creating my controls and code behind?
Thanks.
Kris
|
|
|
|
|
I would start with requirements. How do you know controls are necessary or what the layout will be, what the functionality will be necessary, etc.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for the reply Mark. I already know the requirements and I've already modeled and created my database. I've been writing SQL and working with SQL Server as a systems analyst for 12 years. I've also written some MS Applications in the past and have dabbled with C# and VB.Net, but I'm just now starting out with web development. I've been learning some ASP.Net and am wanting to create some initial pages for my web app to get a feel for it. I'm comfortable enough placing and programming basic controls on the page, but the CSS and design not so much. My initial question is whether I should place my controls on the page first or design the page first using CSS.
Another question I have is whether I should rely on CSS for my placement of page elements or whether I should use tables.
Thanks.
Kris
|
|
|
|
|
Table layouts render slower and are for the most part depreciated in favor of CSS layouts. Start with the layout then you can plug in controls.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for the quick reply Mark. I appreciate the feedback. That's what I'll do.
|
|
|
|
|
I need some guidance on a scenario -
Let's say I have a map of the State of Kansas with each county outlined. I will need to make each county a hotspot, so the entire image would be an imagemap - however, what if I needed to color the Capital a different color dynamically? The map will be a standard image, not google maps or anything like this. Is there any graphics code that I could use to recognize the imagemap coordinates and color the whole county a particular color? Or another question would be can the graphics code detect the region of a county and color it?
What I originally tested was when I created the hotspot coordinate I created another div to place the RectangleHotSpot inside of, and used a style to set the background color. This might have worked but the Div was boxy, and the counties are of no particular shape. I need the whole county a specified color and not just parts of it.
Any help or idea's would be appreciated. This is asp.net, C# Thanks.
|
|
|
|
|
I want to put highlights or technology news from different resource on my home page so when ever I find an interesting aeticle I will put it there
My question is regarding the news url, which option is better specially to support my website ranking, to put the news title with the real news url like cnn.com/xxxx or to put it with my url which is news.aspx?id=999 where 999 is the I'd of the article in my news table or to use a shorten link like goo.gl or x.co with a redirect to the real url?
What's your advise?
|
|
|
|
|
Whichever url format it is, I think it doesn't matter.
The only thing matter is Url should be a valid one.
|
|
|
|