|
Dot Net rookie wrote: My file looks something like this:
It appears you wanted us to see your XML file, yes? Look at your post, we can't see the XML. You have to read and follow the posting instructions for the site to get XML to be visible.
To work with XML the way you describe you want to use the XML DOM (Document Object Model). Classes are located in the System.Xml namespace. Two good web resources with tutorials working with XML is TopXml and www.w3schools.com
led mike
|
|
|
|
|
Hi,
assuming the XML file is in a correct format and that some text are elements just under the root node, you could use XMLDocument to get to the desired node, then change the value and save the file again. Something like...
Private Sub ChangeXMLValue(ByVal XMLPath As String, ByVal NewValue As String)<br />
' Load XML<br />
Dim xmlDoc As New Xml.XmlDocument<br />
xmlDoc.Load(XMLPath)<br />
<br />
' Find node<br />
Dim xmlNodes As Xml.XmlNodeList = xmlDoc.GetElementsByTagName("[Name Of the Tag which contains 'some text 1']")<br />
If xmlNodes.Count > 0 Then ' Found it<br />
' Replace value <br />
xmlNodes(0).Value = NewValue<br />
End If<br />
<br />
' Replace XML <br />
System.IO.File.Delete(XMLPath)<br />
xmlDoc.Save(XMLPath)<br />
End Sub
Something like that. Not tested but hope it helps. 
|
|
|
|
|
Thank you very much it works great.
|
|
|
|
|
I have a project compiled in Framework 3.5[VS 2008]. I cannot deploy it on another server which supports only Framework 3.0.
How do I convert my existing application in 3.5 to 3.0? I have not used any specific feature which belongs to 3.5 only.
Please help
Thanks
|
|
|
|
|
If your using VWD you need
Click Website, Start Options, click the Build node, change Target Framework to the one you want, click OK. You should rebuild the project, then close it out in VWD2008 before reopening in 2005.
|
|
|
|
|
there is a field that its type is datetime in sqlserver. now i want insert a record with c# and i dont know how its format. can any body help me? i want thats code
|
|
|
|
|
Can you explain your problem a bit more, are you having trouble with some code, can we see that code?
|
|
|
|
|
DateTime myDBValue = Convert.ToDateTime(yourTroublesomeObject);
Is this what you mean?
Plze be more exact.
|
|
|
|
|
yeah thats right but my mean is the format of inside paranteses.
Convert.ToDateTime(?????);
|
|
|
|
|
is what you place between () a value in C# or an SQL Value?
Convert.ToDateTime(object) sees your c#value as an object and converts it to a datetime object.
The datetime object will be stored in your database.
Do you use Stored Procedures and SqlParamaters?
You can define an SqlParameter as SqlDbType.DateTime. Then you do not need to worry about date formats.
The direction is from c# value to a database or the other way ?
If you want to style a DateFormat in C# to dd-MM-yyyy you can do
DateTime myDateTime = DateTime.Now;
String StyleMyDateTime = Strong.Format("{0:dd-MM-yyyy}", myDateTime);
could you provide some more details of your problem like some code u use?
|
|
|
|
|
Hi,
I am using datalist control. In that One label is there and One button is also there. I want to bind label value to button.
While in Display there are 4 buttons generated and 4 labels. For labels I bind id. Now When I click button1 I want to fetch Label1 (id of that label)
This is on the Button click event
foreach (DataListItem item in dgBindImage.Items)
{
Label lbl_chk = (Label)item.FindControl("Label1");
Response.Redirect("UpdateProduct.aspx?");
}
It gives me same id from label. But while displaying label it shows differently.
I want different id when the button is selected.
Thanks
|
|
|
|
|
unable to understand what the crap it is?
why u r using response.redirect in a loop ?
state clearly your motive....
you can even assign the value for datakeyfield.....that is the property to be used for such cases....
Ashish Sehajpal
|
|
|
|
|
i have to create a web application for sending the bulk sms...i did googling but not found the proper guidance...that what to do..please let me know what are the proper steps i have to follow...n what is the code...can i send the sms free using some web-services etc...please tell me what are the steps and code for sms......
|
|
|
|
|
Neetu Maheshwari wrote: i have to create a web application for sending the bulk sms...
Gee - that doesn't sound evil at all...
There is no generic code, you need to google for an sms provider in the area, or probably, in the area of your client, who is probably not in the same country as you.
I can't imagine a reason to hope you succeed. Don't we get enough spam ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
oh i mean to say sending sms to all my client at a time...not that type of bulk...sorry for using wrong word...
|
|
|
|
|
Check out http://www.smscountry.com/[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
It depends on the country you want to do this in, there is a back door to the sms systems but most if not all US countries have shut it down.. oh in case anyone wonders why i know that i work for a mass communications firm that does emergency notifications for schools, and some schools and universities wanted sms capability since it travels on a side band to the normal cell traffic, it wouldn’t need an open line like a voice call would..and they seem to have a longer range than what you can get with a voice call. The only way to currently use a providers sms service is to either slave a bunch of phones from x provider to a pc and send them that way or contact an aggregator or become one yourself, but it is a very long(years) process to become a sms aggregator for most companies here. along with signing a large number of very large legal documents saying you aren’t going to spam anyone, and that you are directly (legally and financially) liable if you do. you'd have a better time finding a company that already does it and use their service.
|
|
|
|
|
How to add data in two columns in a grid view and display that in a third column.Please help me out in this matter
|
|
|
|
|
The obvious way is to do it in your data layer
select x, y, x+y as z from myTable
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
if u do not have access to data layer, u can better do it in rowdatabound event.. read value from cells at specific index and add it up to assign it to label present in third column(obviously template column)....
Ashish Sehajpal
|
|
|
|
|
Hi all,
I'h a ajax control ModalPopupExtenderModal in my site, and it's have targetcontrolID to an imagebutton so far so good, and the popUpcontrolID is directed to an panel and thats ok too, but when I click on the imageButton and get the larger image to view, it's ok but I want to click the large image and be redirected back to the page where i came from....
Do somebody have any tips, how I can do that?...
/max
|
|
|
|
|
As I understand it, you want the popup to disappear when the user clicks something in the popup. I think the functionality the cancel button has implemented in this example[^] is what you need. You can download the samples and view the source on how they did it.
Broken Bokken
http://www.brokenbokken.com
|
|
|
|
|
perfect, I solved it...thanx...
/max
|
|
|
|
|
plzz tell me when we write atlas:scriptmanager and when asp:scriptmanager.
tbhattacharjee
|
|
|
|
|
I believe atlas is the old name for it, as in prerelease.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|