read xml doc

This is my first day in ASP and also WEB programming and i am looking into a requirement which is on my plate when someone is on vacation.

There is a HTML page which returns data in XML format.

Something like this






i need to know is how to read this webpage and load this data into my local database. Need to do it in ASP since all the subsequent pages designed are in ASP.

Posted On: Tuesday 1st of January 2013 09:37:42 PM Total Views:  165
View Complete with Replies

Related Messages:

facing this error when ...   (284 Views)
DearI am developing my application in ASP.NET(c#)i facing a below error when i am trying to search. I am using windows 2000 and .NET 2003 framework 1.1when you enter some text in textbox after then you have to select a option from radio button that you want to search from this site or from google.Both option are not working. it gives a below error.Please help me outBest regards,System.Web.HttpException: Unable to validate data.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [HttpException (0x80004005): Unable to validate data.] System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) System.Web.UI.LosFormatter.Deserialize(String input)[HttpException (0x80004005): Authentication of viewstate failed. 1) If this is a cluster, edit configuration so all servers use the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. 2) Viewstate can only be posted back to the same page. 3) The viewstate for this page might be corrupted.] System.Web.UI.LosFormatter.Deserialize(String input) System.Web.UI.Page.LoadPageStateFromPersistenceMedium()[HttpException (0x80004005): Invalid_Viewstate Client IP: Port: 2115 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50215) ViewState: dDwxMTgyNzkxNzI4O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDA+Oz47bDx0PDtsPGk8MD47PjtsPHQ8O2w8aTw0Pjs+O2w8dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8cDw7cDxsPE9uQ2xpY2s7PjtsPHJldHVybiBjaGtFbWFpbEFkZHJlc3MoJ0xvZ2luMTpFbWFpbElEJyk7Pj4+Ozs+Oz4+Oz4+Oz4+Oz4+Oz4+Oz4+O2w8TG9naW4xOkxvZ2luOz4+AcXdILoR57tJ8ivPyXVkwvqIcw8= Http-Referer: http://localhost/eng/default.aspx Path: /files/StoreSearchResults.aspx.] System.Web.UI.Page.LoadPageStateFromPersistenceMedium() System.Web.UI.Page.LoadPageViewState() System.Web.UI.Page.ProcessRequestMain() +447
GotFocus/LostFocus in Web Controls   (153 Views)
hi Is there any way to fire the GotFocus/Lostfocus(Enter/Leave) events in ASP.Net Web Controls dynamicallyIf so please guide me with samples.Thank u.
sort datagrid   (162 Views)
I have set the allowsorting and allowpaging to true but do not get the columns as links.Do you know wh
Disable Submit Button after click   (206 Views)
I searched the forum for an answer to this and someone posted the following code:Code: The javascript code is: function disable() { document.myform.mysubmit.disabled = true; document.myform.submit; } The problem is that it works as far as the button being disabled, but it wont submit the page...we are at a loss on how to disable the submit button and have it submit...Jared
Equivalent of a Tag property   (146 Views)
In the Winows world, I used to store information on the Tag property of a TreeView so that I could retrieve the record from the database. There is no Tag property on a TreeView in ASP.NET IE Web Controls. Where would I store the information and how would I retrieve it
DateTime.ParseExact Problem   (248 Views)
Can someone please tell me what I'm doing wrong: I have this string: 11/24/2006 03:30 That I am trying to put in the following format: 2006-11-24 03:30 AM I tried using Parse Exact: datetime.parseExact('11-24-2006 03:30','yyyy-MM-dd HH:mm tt*',CultureInfo) That generates the following error: System.FormatException: String was not recognized as a valid DateTime. Can someone please tell me what I am doing wrong. Is the string format wrong
printing a listbox   (224 Views)
i ahve a list box with informnation in and want to print the information when a command button is pressed. my pages are aspx pages in visual studio. my project is a website and so i cannot find a way of adding a print dialog which is possible whwne using a project. can anyone sugest any code to print the list boxes please
WAN IP ADDRESS   (222 Views)
I have an aspx page and would like to display the user's WAN IP.How can I do thisI get the IP address of the router help me.
advice regarding and includes   (180 Views)
i'm reposting as I posted in the asp forum but I think this is the correct place. I have a small application that I needed to do in .net and could not do in asp. the rest of my files on the server are all in asp and I want to include files (for headers and footers and other parts of the page) that are .asp files. Can I do this Can I mix asp and or at least include asp files in an page. How
Invalid object name 'ctd_priority_db' ?   (379 Views)
Need help with inserting data to a database Gives an error Invalid object name 'ctd_priority_db' Can some one help protected void Button1_Click(object sender, EventArgs e) { //lblresult.Text = TextTwo.Text; SqlConnection myConn = new SqlConnection("server =; uid = xxxxxx ; pwd = xxxxx; database = ctd_priority_db;"); myConn.Open(); string pname = TextTwo.Text; string sqlquery = ("INSERT INTO [ctd_priority_db] (Name) VALUES (' " + TextTwo.Text + "')"); SqlCommand myCom = new SqlCommand(sqlquery, myConn); myCom.Parameters.AddWithValue("Name ", pname); myCom.ExecuteNonQuery(); I want to insert the value in the textbox (TextTwo) into my data base but on debugging I get an error search function   (168 Views)
.. i m currently working on search function using but i need a function where it will show the results as you type in the texbox..without hitting the search button.. really need it for my project.. anyone can guide me on how to work on it,i m using visual studio 2008..
label   (152 Views)
strsql1 = " select EST_NAME + ',' + OFF_NAME + ',' + DIS_NAME as node from grievancedetailscomplete where (EST_CODE='" & PEN_EST_CODE & "' AND GRV_CODE=" & PEN_GRV_CODE & ")" dbcon = New SqlConnection(ConfigurationManager.ConnectionStrings("PGConnectionString").ConnectionString) sqlcmd = New SqlCommand(strsql1, dbcon) sqlcmd.CommandText = strsql1 sqlcmd.CommandType = CommandType.Text dbcon.Open() SqlRs = sqlcmd.ExecuteReader() Label1.Text = strsql1 sqlcmd.Dispose() dbcon.Close() in this code, i want to give the value of select statement to a label, but i failed, if anyone know that , then pls help me
xml database   (251 Views)
is it required to create a web config file for xml database
inserting data into a input box from an sql statment   (118 Views)
You have the line of code where you are requesting a value in the querystring, but I did not see anywhere else in your code where you send the data to the querystring. You need a statement like the following: Response.Redirect([url].aspxgroupname=[value]); Looks like your are generating the data on the same page that you want to read it, so you can fill in the url place holder with your page name. Here's a more detailed example on how to use querystring in ASP .NET. This still isn't going to solve your problem because you have a datasource declared and configured, but you aren't actually executing the query. If you are going to take the approach you are taking you need to execute the command against your datasource and store the record results in some kind of object. Read up on ASP .NET Data Access, I think you will find this information very useful. Honestly, a gridview approach (which your instructor suggested) would be a much better approach to take in my opinion. There are other options as well (e.g. details view, form view, etc). You can then easily use bind()/eval() methods to populate your controls. Also, they are highly customizable when it comes to formatting the way they look. Hope this helps. GOOD LUCK!
how i check values   (168 Views)
Hi i all most finished my project but i don;t know how to check if the author_id which give the user is also exists and give him a messege to change the author_ adn after write in table author and the other element and samething else how i check if user give the birth_day in form 01/01/2000 (dd:mm:yyyy) and no other form
OnClick Event is Getting Strange/Old Values   (227 Views)
! I have what I'm fairly certain is a fairly simple question. I have a site that is being populated by information from an SQL database. This is a first attempt, so I may be doing things a little backwards. I have an SQL Datasource in my page that is tied to a dropdownlist. A button is used to actually 'select' the skill and change the information on the page depending. Here's the controls... And here's the onclick event for the select skill button: protected void btnSelectSkill_Click(object sender, EventArgs e) { selectedSkillID = Convert.ToInt32(menuSkills.SelectedValue); // int declared outside of the method. CMS.SkillDataTable skillSearch = skillAdapter.GetSkillBySkillID(selectedSkillID); foreach (var skill in skillSearch) { spanSkillTitle.InnerHtml = skill.Title; divSkillDescription.InnerHtml = skill.Description; } } That's all working fine. I have editors coded that allows me to edit the content of the span that the title populates, and the div that the Description populates. I then have a 'Save Skill' button that should be updating the skill entry in the database to my shiny new values. I have the button coded like so: And the event method looks like this: protected void btnSaveSkill_Click(object sender, EventArgs e) { try { int a = skillAdapter.UpdateSkillTitleDescription(spanSkillTitle.InnerHtml, divSkillDescription.InnerHtml, selectedSkillID); lblNotifications.Text = Convert.ToString(a); } catch (Exception err) { lblNotifications.Text = "Couldn't access the database, or something"; } } OK, so when I click through here it's doing several annoying things. It's getting the original, database values from those .InnerHtml calls.It's getting a value of 0 from the selectedSkillID... I imagine there's something I don't know about the order that onclick events are called.
script of popup for a hyperlink   (146 Views)
here is my gridview... actualy my task is to get popup on clicking th that the enitre internte explorer wil not display i.e options like file ,edit should not be visible..chek hyperlink here and then getpath function below that ... --%>, ,   getpath function is here... protected string getpath(object s) { return ("(" + s)+""; //string m = "'..//Jobseeker//quest.aspxid=+ s','cal','width=779,height=400,left=270,top=180');"; //return m; //s = "Questseach_details.aspxid1= +s','cal','width=779,height=400,left=270,top=180"; //return s; }
Logging to the IIS Log files   (130 Views)
Hi Can anybody tell me how to write to the IIS log file from the ASP.NET application...... Basically i want to log the path along with the Query string which the user has clicked on the application.
Read Voice input from Telephone and convert into Text   (188 Views)
when i get a telephone call i want to read that call and recognize the speech and convert that into Text format. pls, tell me how to do this..
how to set Scroll bars width   (215 Views)
how to set scroll bars width for Panel control in ASP.NET
Detailsview default values   (233 Views)
Hi all,In my detailsview control, I need to set some default properties that get's dynamically set. How can I set some of the fields of my detailsview fields when I click on "New" so when the page refreshes to insert the record, I see the values...and then, when I click on insert, other than inserting the record, I want to do some more stuff, do I do that in the "onrowinserting" metho
[Resolved} retval   (144 Views)
I have an app in which I use the following code to start an outside app, but it is very specific about the location of the app. In the installer, like in most,, the user can change the default folder into which they want to install the perogram. How can this code be altered to accomodate the folder the user designates if it is not the default folderCode: retval = Shell("c:\program files\wjm software\program\Data Management System.exe", vbNormalFocus
Performing Calculation In Gridview itemtemplate   (231 Views)
I want to perform calculation in gridview :NetAmount=(ServiceAmount*Quantity)*Discount I had written code in rowdatabound but it is not working,i amnew to programming help me solve this proble i would appreciate if some one share ther knowledge my Axpx code is: function CalcSercode(ServiceAmount,Quantity, Discount,NetAmount) { var Quantity=parseFloat(document.getElementById(Quantity).value); var Discount= parseFloat(document.getElementById(Discount).value); var ServiceAmount=document.getElementById(ServiceAmount); var SerAmountValue = parseFloat((ServiceAmount * Quantity)-((ServiceAmount *Quantity)*Discount/100)); //var SellPriceValueRound = Math.round(SellPriceValue,4); var SerAmountValueRound = SerAmountValue; ServiceAmount.innerHTML= SerAmountValueRound ; } _____________________________________________________________ My cs code is; //TextBox TxtServiceCode = GridView1.Controls[0].Controls[0].FindControl("TxtServiceCode") as TextBox; //DataSet dss = new DataSet(); //SqlConnection MyConnection = new SqlConnection("server=prog; database=mydatabase;UID=sa;PWD=naco123;"); //SqlCommand sqlcmd = new SqlCommand("select * from [ServiceCode]", MyConnection); //SqlDataAdapter adp = new SqlDataAdapter(sqlcmd); //DataSet ds = new DataSet(); //adp.Fill(ds); //GridView1.DataSource = ds.Tables[0]; //GridView1.DataBind();
Need assistance with returning first paragraph of stored text   (257 Views)
I need to format a field to show ONLY the first paragraph...This will be used for dsiplaying a teaser to an article.I have the value coming in with a lblContent.DataBind() which makes lblContent.Text = the entire article. What are some ways to get this to ONLY have the first paragrap
passing arguments   (404 Views)
i tried to pass an id from the catogue to an detail page :so i use this url :detail.aspxid=11and here is my code about SQL of detail.aspx :Dim SQL as String = "SELECT * FROM news WHERE newsID = '" & Request.QueryString("id").ToString() & "'"but when it executes, an err appeared.Here its :"Datatype mismatch in criteria ..."so whats wrong Thnks for yur concern !
Ajax MaskedEditExtender not displaying mask   (172 Views)
Okay, this is really throwing me and making me feel crazy. I'm sure I'm missing something dumb. I'm building an account registration form, and I want to put a mask on the phone number textbox, i.e. XXX-XXX-XXXX. I'm using the AjaxToolkit MaskedEditExtender and MaskedEditValidator. The validator actually does display it's error message, but there is no mask on the textbox. I have the toolkit registered in the web.config, and everything else I'm using from it works fine. I did notice that I can't drag-and-drop the maskededitextender into the form, which seems odd: the maskededitvalidator dropped in fine. Here's the table cell that has the phone number controls: I'm really at a loss as to what's going on, and I'm beginning to wonder if it's an issue with the page or the toolkit assembly, or maybe just doesn't like me anymore.
Learn ASP.NET   (175 Views)
hello please help me in learning ASP.NET and C#. please tell me free sites to download books on ASP.NET and C#
login page in c#   (135 Views)
You can find everything you need to know about implementing windows authentication here.
Accessing .cs variable from .ASPX page   (140 Views)
I need to access a variable from my code behind in the .aspx page and it's not working. Here's what I'm trying:.aspx page - RequiredFieldValidatorCODEand here is the public field in the code behind:CODE public string LoginRequired { get { return "Error, please try again"; } }When I run it, I don't get anything in the validation summary control, it just appears blank. I have tested it with the string value in the control and verified that it works so it's not a matter of the control not being setup correctly.Any ideas
VS 2003 debugging issue   (145 Views)
This has me going around and arounde. I have a VS 2003 project that can be built and deployed without issues. however, while in the IDE, I can't run with debug. I get a popup that says: "Unable to find project on the Web server. Unable to set server into correct debugging state automatically. you may not be able to debug ASP pages. Do you want to continue launching the debugger"To the best of my knowledge, this is what needs to be done:1) Setup IIS to point to a folder within the project's path.2) Modify the file .csproj.webinfo so it contains a line similar to: localhost would translate to the home page folder setup in IIS and any additional folders to get to the actual project file would follow.I've done this and I can't figure out what's wrong. Please help !
Clocking System   (108 Views)
Everyone,I have been given a project to complete and I am wanting to do some reasearch and gain some feedback before I start it.An off the shelf solution is out of the question on this occasion.I have been asked to produce a clocking in and out interface in The scenario would be:1: Person comes into work.2: Loads up public page3: Clicks on their name4: clicks on clock in.5: End of day, user clicks name again.6: user clicks clock out.The system would need to store the time the user clocked in and the time they logged out and calculate the total time for that day including date.Advise and any examples would be greatly appreciated.Many
How to retrieve values seperated from split funciton   (221 Views)
Hi all,I have a string str=tasks|001with the help of split i can split them dim strarr as string()strarr=str.split("|")and know I want to capture in this way str1=tasksstr2=001.How to do,I trying using FOREACH dont know how far it will work.
Treeview breaks when you use physical path for link   (138 Views)
Hi I have a treeview control which gets it values from a database. Up until now it has worked fine as all the links in the tree have been going to virtual paths like: default.aspxID=1.My client has now asked that we include a press realeases section to the tree which links to external pages: and the tree view then breaks saying' not a valid virtual path.'the line it breaks on is AddNode(node, GetParentNodeFromDataReader(reader));Does anyone have any idea why this is happening I am working with visual web developer 2005 and working with 2.Thanking you in advance
Select an item from a dropdown list based on wildcard   (159 Views)
Can I select an item from a list of items in a drowdown control based on the first few characters of the list itemFor exampleI have a listABC123ACC446ADD987I may not know the whole string except ABC. Can set the SelectedIndex to the one that starts with ABCWhich GURU has the magic answer
Editing Project on Remote Server   (138 Views)
A colleague of mine has been having an interesting problem and I'm not sure if anyone has encountered the same thing.He created a project (VS2005) that uses a Virtual Directory for a remote IIS server. However when he makes the change in the code, it's not reflected when he calls up that web page outside the project. He saves, builds the project, etc after editing.If he edits the file in notepad and saves it then you can see the change when you fire up the page from IE instead of from within the project.I am not using this particular Virtual Directory so not sure what is wrong. Anyone
How to Stop on_click event from firing on Page Reload???   (168 Views)
,I have a problem that I'm sure someone has to have a very simple answer for.I have an web app that has a save button when clicked will save items in a listbox to a MSSQL 2005 database. Works great!The problem is whenever the refresh button on the webpage is clicked, the previous save transaction is again played to the database because on on_click event gets fired again. This is not good.!Page.IsPostback prevents the event from being fired altogether (during the initial page load and any subsequent postbacks. Someone plz, plz, plz tell me what I'm missing here
TableAdapter method does not return a value. What am i doing wrong   (228 Views)
I have a TableAdapter defined that invokes a method 'RequestPasswordReset'. The RequestPasswordReset method returns a value of userid is valid crentials could be authenticated or -1 if not. When i test the fucntionality of the method in the dataset Preview Mode it works fine.but when i try to access the method through the following code, it never return any valuewhat is that i am doing wrong. 'Check with the User credentials provided and allow the user to add a new password Dim objRegistrationTableAdapter As New dsRegistrationTableAdapters.objAccountsUserProfilesTableAdapter iUserID = objRegistrationTableAdapter.RequestPasswordReset(UserName.Text, cboSecurityQuestion.SelectedValue, SecurityAnswer.Text) If iUserID > 0 Then Response.Redirect("PasswordReset.aspxUserID=" & iUserID) Else lblError.visible = True End If
Postback Invalid   (235 Views)
Hi ,Hope is well! I have a problem displaying the tree view on Pocket Internet Explorer. The tree displays and works fine using desktop browser, and expands nodes perfectly. The first time i load it up on Pocket Internet Explorer it displays fine, but then when i click a node i get the following error.Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid .... blah blah blah.Now if i change the enableEventValidation property, then the error doesnt occur, but the tree node doesnt expand.Does anyone know how to fix this Is it something to do with Pocket Internet ExplorerThe code for my page is below :Can anyone get it to work I am using Windows Mobile 5 Emulator through Visual Studio title
share session data contents between two aplications   (250 Views)
There are two apps running on differnet servers, both of them in local intranet.Both use the same model for something, making use of Session["variable"] to store some stuff.What I want is to enable keeping the same session data between two apps, e.g. I browse app1, session variables change and if I go to app2 from app1, session data is taken from app1's session.Is there any way to do that apart from passing the variables in query string in the links between apps, etc I wonder if there's some pre-made framework to achieve that or something..
crystal   (208 Views)
I have created a crystal report in my project.Do you know how I can just run the report on its own to test if it works firs
vss and stored procedures   (168 Views)
I'm not sure if this is the right forum, but....Is there a way to integrate vss with stored procedures Perhaps with or query analyzer We are using sql server 2000.Thank you in advance for your response.SteveS
How To Dynamic Create and Publish Xml WebService   (134 Views)
Hii am intrested to know how can i create at run time ASP.NET webServicei need to develop a wizard that will enable to expose .Net Assembly as WebServicebut i don't really understand how it can be donei saw some products that can do such things with Javacan and how can it be done with .Netand help will be wellcom
Why does .xsd not seem to work with my namespace.   (144 Views)
I get the message:Type 'underclassOrders.School' is not defined.This was an XSD file generated by Visual Studio. When I open the file I see:targetNamespace="" What is up with that. Shouldn't it be my namespace, 'underclassOrders' Why does Visual Studio break my code!!!
DataGrid not showing...   (158 Views)
I'm new at all this but have spent several hours going through many many examples of doing a simple hook up to a data grid in Studio.NET.The grid never appears in browser mode; everything is perfectly set up; cnn, adapter, dataset, Grid parameters;any ideas
Client side - why all the misery...   (135 Views)
Notwithstanding there are a few examples of JavaScript doing this and that I'm having a heck of a time doing a simple calculation on the Client side, e.g., User enters 50 into textBoxA.textBoxB is set aside to show results of a calculation; say a complex stat equation, which only needs the valuein A to display material information.If you use JavaScript, you cannot use asp:textboxesIf you use ASP, JavaScript can't see asp:textboxesI suppose the answer lies somewhere in between. I have come across a "scrollTop" routine which is suppose to bookmark your position on a page so you don't get lost during a round trip to the server.I would think that client side calcualtions and simple population of result textboxes would be a standard and deed component of ASP.NET development.What to do ,
Asp Calendar control problem   (146 Views)
Hi . Its been a while since I've needed help, but I need some now. I am trying to, when the page loads, select the current date & the next 10 days. However, I am having some killer problems.Public Sub Calendar1_DayRender(ByVal sender As System.Object, ByVal e As DayRenderEventArgs) Handles Calendar1.DayRender Dim tc As TableCell tc = New TableCell() tc.BackColor = Color.Crimson Calendar1.SelectedDayStyle().BackColor = tc.BackColor Dim i As Integer For i = 0 To 10 If Date.Now.AddDays(i).ToShortDateString >= Date.Now.ToShortDateString And Date.Now.AddDays(i).ToShortDateString < Date.Now.AddDays(10).ToShortDateString Then tc.Text = Date.Now.AddDays(i).ToShortDateString & " " & i Label1.Text = tc.Text tc.BackColor = Color.DarkGreen Calendar1.DayStyle.BackColor = tc.BackColor ' right here is my problem. How do I set a day on the calendar not a day selected, but just a day (in fact, one that equals the day in the loop). End If NextEnd SubAny and all help is much appreciated
New To .NET   (214 Views)
all,I am an ASP programmer for 2-3 years.Now my boss tells me to move to .NET.I have some very primary questions.1> Does it support all browsers 2> How to start Where will I get learning tutorials 2> what are advts and disadvts of it
Row Databound   (225 Views)
How do I find out the count of the underlined items. For instance which row and cell.State TotPend PendnFO PendnDDSMD 80 256 782Area1 102 148 256456 22 16 25 876 15 29 32 Is the underline row 3 and cell 1 I'm starting with 0 as the count for the row and the cells. Do I do that with Gridviews
question about programmatically setting visibility on asp:hyperlink   (196 Views)
I have a series of links that I want to be visible only when the url is equal to a certain address. I am using the asp:hyperlink control with unique ids. In my code behind I have:Inherits System.Web.UI.UserControlProtected Sub Page_Load(ByVal sender as Object, ByVal e As System.EventArgs) Handles Me.LoadDim serverURL As stringIf serverURL = "" ThenhyperlinkID.Visible = FalseElsehyperlinkID.Visible = TrueEnd IFEnd SubMy question is that this code worked once but now I am receiving an error that my hyperlinkID needs to be declared. Since it is an id of a control how would I declare it, or is there something else wrong Also how would I incorporate using the Request.Url.ToString to get the url of the page a person is on dynamically I do not want to hard code it.Since request is not part of the System.Web.UI.UserControl I receive an error. I have looked at several tutorials for .net and understand them but when I go to write code I am completely lost and overwhelmed...please help.
Outputting to repeater   (76 Views)
I am building an adapter (from a sql connection) and binding it to a repeater in my codebehind page, I just need to know how to call those values in the repeater... I am doing but that is only producing System.Data.DataRowView - how do I get the values of the fields of the db