Import Data From Either XML Or JSON Feed
Nov 6, 2010
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?
View 4 Replies
Similar Messages:
Nov 18, 2010
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?
ASPX:
[Code]...
View 2 Replies
Apr 23, 2010
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.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="CurrentTimePanel" runat="server">
<ContentTemplate>
<asp:Label ID="CurrentTime" runat="server" Text="Now: " />
[code]...
View 5 Replies
Aug 11, 2010
I try to use the jquery + json to get all elements in form and build a JSON var to post in a ASP.NET MVC method.
[Code]....
It method get all fields in a form and build a JSON, but it dont put JSON inside JSON.
Example:
If i have the follow form:
<input name="person.name"><input name="person.age"><input name="person.address.street">
The serialized string build a JSON like this
{ "person.name": "??", "person.age": "??", "person.address.street": "??" }
I need a plugin or some function to generate like this:
{ "person": { "name" : "??", "age" : "??", "address":{ "street": "??" } } }
View 1 Replies
May 20, 2010
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.
View 6 Replies
Mar 7, 2010
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?
View 3 Replies
May 17, 2010
their is an easy way to supply data to a menuitem from a sqldatasource?
View 6 Replies
Aug 3, 2010
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.
View 5 Replies
Feb 10, 2010
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.
View 2 Replies
Aug 13, 2010
Hey I have a XML Feed which is sometimes slow to connect to making my front page quite slow to load sometimes.I load it as follows Try
[Code]....
How Can I set a timer on these i.e give it 5 secs if it doesnt load, just forget it and go straight to catch for example
View 1 Replies
May 18, 2010
Currently I have
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
View 1 Replies
Dec 29, 2010
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.
View 4 Replies
Nov 23, 2010
I have to bind OData feed, which is a response from WCF Data Service, to a gridview. The structure is as follows:
[Code]....
[Code]....
View 1 Replies
Feb 1, 2010
I want to retreive the data from database and assign it to dropdownlist. For that I'm using the following jquery in the onclick event
[Code]....
View 1 Replies
Jan 21, 2011
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?
View 4 Replies
Apr 4, 2011
In my javascript code I am getting json string from cs file
var tmpString="<%=resultset2%>";
In cs I am concatenating strings to build json string. Here is an issue the json string is returned as a string and it has " with it.
"[{id:'1',name:'Aik'},{id:'2',name:'Aik or Aik'}]"
Because of " in beginning and end javascript code treat it as a string.
View 2 Replies
Jul 14, 2010
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?
View 3 Replies
Jan 27, 2010
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)?
View 2 Replies
Mar 26, 2016
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?
View 1 Replies
Dec 2, 2010
I am developing a asp.net website..in the admin side..i have a gridview...i want to copy all the data in the gridview to a table in sql server 2005..
View 3 Replies
Jul 2, 2010
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.
View 1 Replies
Mar 2, 2011
i am use this code for read excel file:
[Code]....
how to read special cells in excel and I save to DB.
for example: B4 and C4 is merged with named B4.how to read Data of this cell.
View 4 Replies
Apr 15, 2010
Can anyone suggest a good Article which shows this operation.
View 4 Replies
Jul 31, 2013
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.
View 1 Replies
Apr 27, 2016
I am trying to import a CSV file using web service bt i stuck while displaying it in gridview.
View 1 Replies