I am going to import some data, and I have the data available in either a JSON feed or a XML feed. I can't decide if I should use the XML or the JSON feed.
What are the pros and cons of choosing either feed, and what is your prefered choice?
I've been tasked with implementing a JSON feed on an asp.net website that will be consumed by 3rd party apps (such as IPhone, Android, etc) and I'd like to follow best practices.
An example of what I'd like to achieve would be something similar to: [URL]
I've chosen the JSON.net api as this seems to be highly recommended.
My Google-fu must be failing me as I can't find a single full example code for an Asp.net web application with JSON.net implemented on it, so I've no real concept of where to begin.
My question is fairly simple:
Should I create this sort of feed as an ASPX, or ASHX file? Or even a .NET Web Service? (Remember that the tools that will be using this feed are on external apps like IPhones, etc)
I created a test feed in both ASHX and ASPX format ... here is the code (I'm using Subsonic to populate the collection) ... are either of these along the correct lines?
I have a data import page where I start the Import by clicking a button.Second by second I want to print in Web Page informations about record is being importing.
I'd like the user to specify a RSS feed address and serialize the information from it. I am not interested in the XML format, but populate a strongly typed object from the XML. My question is, is there a standard that all RSS feeds support (Do all of them have date, title etc)? If so, is there a XSD that describes this.If not, how do I handle serializing a RSS feed to an object in ASP.NET?
EDIT: The SyndicationFeed's Items have the following properties:
Title.Text -> Gives us the title Summary.Text -> Gives the Summary
Q1 - The Summary includes the html tags. Is there a way to strip them? I am interested only in the text Q2 - Do all RSS feeds have full content in the Summary element? I see that some RSS feeds have only a few lines for Summary while others have the entire content of the post.
I've wanted to incorporate my blog into my website, and be able to organize the data in the blog based on the keyword tags- so I can use the single blog and present relevant blog entries on different sections of my website, where I have control over the formatting, etc.
After exhaustive research (where I've learned a lot about RSS, XML, ATOM), it looks like I'm going to have to write one heck of an extensive xsl file to be able to access the XML data in an atom feed, and it seems that surely I am trying to reinvent the wheel.
Does Visual Web Developer Express have a better way to create a website with atom feed elements? If not, is there another way I should go about this?
I am required to create a functionality like the "Top Tweets" of www.twitter.com,I started out thinking that it would be simple and just use a update panel and a timer with a gridview in the middle of it and just have it update every few seconds. but as you can see the problem here it updates the whole entire gridview and I just want to go ahead and add the new updates to the top of the page and not refresh the whole entire feed everyfew seconds.
I am looking for a simple (fastest execute solutions) for generate RSS feed from user search result in ListView & ObjectDataSource?
For example; User does some search, the search result summary is display in ListView. If the user like the search result, he/she click on RSS button, then RSS feed is generate with entire current view record/table.
dlRSS.DataSource = GetRSSFeed("http://www.foodsafetynews.com/headlines.xml") dlRSS.DataBind() Function GetRSSFeed(ByVal strURL As String) As DataTable 'Get the XML data Dim reader As XmlTextReader = New XmlTextReader(strURL) 'return a new DataSet Dim ds As DataSet = New DataSet() ds.ReadXml(reader) Return ds.Tables(2) End Function <asp:DataList ID="dlRSS" runat="server" Width="100%" > <ItemTemplate> <strong><p><div><asp:HyperLink ID="TitleLink" runat="server" Text='<%# Eval("title") %>' Target="_blank" NavigateUrl='<%# Eval("link") %>'/></div></p></strong> <strong><p> <div><asp:Label ID="SubtitleLabel" runat="server" Text='<%# Eval("description") %>' /></div></p></strong> </ItemTemplate> </asp:DataList>
But is returning all rows in RSS Feed I would only like top 5 or so
I have a text file named gisQuery129.json that is created using Json.NET - [URL] There is an example on how to create a JSON file and I have done that successfully, but I want to read the file on a page load event and add the values to .NET textbox controls for input values in a query. The created file looks like the following:
{ "myData": { "randomNumber": "129", "Application": "MyMapApp", "FeatureId": "ALL", "Feature": "ALL", "spatialQuery": "FEATURE_ID= '11111' AND REQ_SEQ_NUM= 1 AND RAND_PARAM= 129 OR FEATURE_ID= '22222' AND REQ_SEQ_NUM= 2 AND RAND_PARAM= 129" } }
I want to read the data in the above sample JSON data and then populate my textboxes something like this:
txtRandParam.text = "129" txtApplication.text = "MyMapApp" and three more text boxes after that.
I use the JavaScriptSerializer class of ASP.net to serialize my object and return it to the client side. How can I deserialize the string using JavaScript?
this started out as a pretty simple task to import a customers data into our database. The script below loads all the data into memory and then allow manipulation after.
string ConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="" + FileLoc + ""; Extended Properties="text;HDR=Yes;FMT=Delimited(,)""; using (OleDbConnection conn = new OleDbConnection(ConString)) { using (OleDbCommand cmd = new OleDbCommand("SELECT * FROM DataInput.csv", conn)) { conn.Open(); using (OleDbDataReader dr = cmd.ExecuteReader(CommandBehavior.SequentialAccess)) { int RowNumber = 0; while (dr.Read()) { if(RowNumber==0) { for (int i = 0; i < dr.FieldCount; i++) { TitleData.Add(new CSVTitleData() {ColumnID = i,ColumnName = dr.GetValue(i).ToString()}); } } else { var DataToInsert = new List<CSVData>(); for (int i = 0; i < dr.FieldCount; i++) { if (i == 8) { var A = dr.GetValue(i); Console.WriteLine(A.GetType().ToString() + " - " + i); } DataToInsert.Add(new CSVData(){ColumnID = i,Value = dr.GetValue(i).ToString()}); } Content.Add(DataToInsert); } RowNumber++; } } } } This works fine until there is data like 4950 4951 4952 4998 2024 4176 7025-1 RVAC010 RVAC011 4945 4946 4947 4948
Excel tries to be clever and reads each of the fields as an Int. Resulting int the ones with a letters in being read as DBNull. Now I've done some reading and there are lots of people with this question but no solid solution. One of the possible solutions is to create a Scheme.ini I wonder if someone can help me out with the exact format of that? Or perhaps there is an easier was of reading in the CSV?
Can i create a partial view and a controller that will feed data to the view, and if i render that partial in a Master page, the Data will show on whatever URL i am?
Or is there another way of showing content from database on every page(view)?
I have an excel sheet which has several parent records/rows and every parent row/record has several child sub-records under it. I have a field called ID which is of the type String as it contains a mixture of characters and numbers and is common for both parent and child records. How do I store the parent and child records in separate database tables, retrieve them and display them in a nested gridview?
i am binding a gridview through a query like select * from table, But i am not showing all fields in gridView. Only few fields i am showing in gridview. Now I want to import data to a excel sheet. i want to import data showing by gridview and also which is not showing by gridview. i meant all fields in database table should import to excel sheet.
I am making a form to import excel sheet from local computer to azure sql database easily.
I am using [URL] ...Â
I have made The ID as : Â Identity, Not Null.
As in my Excel sheet data the ID column is empty, as normally i used to integrate whole excel to sql db so it auto generate, but its waste of my time.
So I want to ask in order to make it successful in case i have no ID numbers for my data in excel file and have Not Null at azure sql db and want to auto generate ID on sql server db after the data that is already on the sql server db.
Because the table where data will be stored is having like already 142302 records and i want to generate my uploaded excel file to there and numbering automatically for ID as 142303, 142304 .... So on.