Click here to Skip to main content
15,886,037 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi team, i am trying around an issue where i have different text coming up based on conditions i put in my code , the text comes up as xml in my code
from the text i need to check if a specific property exists if yes i need to replace that specific property and other properties of the xml string

example string i am trying now being

if condition=product details

Product Details



Type : 50
Limit: 1500.00
Cash Limit:
Cash Advance: 1000
PIN code: Y



my requirement is if Type is 50 then i should hide cash limit and pin access properties
if type is other than 50 i should display



can someone guide me on this, i could not use replace for this as above text varies based on condition, above scenario condition is product details, if condition is other than product details then above xml will vary hence i could not use replace option in c#.

could some one guide me the best way to do this
Posted
Comments
George Jonsson 30-Oct-14 11:14am    
Where is your XML data? I only see some text.
How do you display the data? DataGridView, HTML or what?
srinimuk 30-Oct-14 11:17am    
hi above text i have given is coming as xml and i am converting it into string,i am populating this text in a label.
John C Rayan 19-Feb-15 11:23am    
Create a rule xml file where create 'condition' element and the properties as child elements that you want to hide. In your code, read the XML and apply the rules. You could have masks in the XML file too for each property.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900