i work on asp.net C# web.Above url contain some information ,i need to save them in my database and also need to save then in specified location as xml format.This url contain a table.I want to get this table value but how to retrieve value from this html table.
HtmlWeb htmlWeb = new HtmlWeb();
// Creates an HtmlDocument object from an URL
HtmlAgilityPack.HtmlDocument document = htmlWeb.Load("http://www.dsebd.org/latest_PE_all2_08.php");
get table information from this document .How to save this table value.Show me some syntax
How do you check for null with HtmlAgilityPack? I'm getting "Property or indexer 'HtmlAgilityPack.HtmlNode.HasChildNodes' cannot be assigned to -- it is read only" with the following.
if (Node.Element("TD").HasChildNodes = DBNull.Value)
I"m getting "Object reference not set to an instance of an object. " with
I am trying to get the value of a timer using the HtmlAgilityPack however when I get the innerText by the element ID it returns --:--:--Is there any way to get the time value since it uses AJAX?
I need to get links from the following url http://thomas.loc.gov/home/gpoxmlc112/. I wrote the code:
[Code]....
On the page, I only want to get the urls of the xml files. But, the .xml are not getting pulled? I checked the view source, the links are not placed in a table or row (maybe thats part of the problem) ? I can't figure out of to get the links? My expected results are:http://thomas.loc.gov/home/gpoxmlc112/sr79_rs.xmlhttp://thomas.loc.gov/home/gpoxmlc112/h1_ih.xmletc...
my main intention is that, the exsisting table of sql server database(.dbo) with 1000's of records, that should be import to a new access database table(.mdb).for example if we want to had a new table in db2, of exsisting table in db1 with some conditions by using "select * into New_Tabel from (select * from Exsisting_Table where <Condition>) as objectName". Here the new table is created and records inserted in one execution in db2. The same work should be done for access(sqlserver db --> Access db).Here the new access database table with given name (as string_sysdate) must be created dynamically by clicking a button (multiples time creating new table).Is there any query or c# code for sql server database to access database.
If I am going to use the asp.net membership and roles, the asp.net database includes an aspnet_Users table that has the userid and email address. If I have custom fields is it best practice to maintain a separate usert table and link on user id or to add fields to the aspnet_Users table?
Basically i deal with two tables.i have a table T1 of the following format:id company_name i need to read this data and create a table T2 as followsi wrote the following code. it worked fine for retrieving data and modification but fails to insert the modified data into the 2nd table.the error is, it does not recognise the value for @token
ArrayList dynarr=new ArrayList(); // global variable protected void Button2_Click(object sender, EventArgs e) { int row = 1; int i; string strcmd = null; string Connection = "Data Source=...."; SqlConnection conn = new SqlConnection(Connection); string str = "select company_name from T1 where ID=@ID"; [code]...
I have an Access 2010 DB that I have a table of RAW data in. In my scenero when table 'a' has been populated all the rows with the updatedate of Now() get moved to another table... the SQL is like this...
[Code]....
As you can see it is a very simple query but it does NOT return any rows. There are actually 404 rows with todays date in teh Append_Date column.
I am fairly new to ASP.Net and web programming in general and I am having issues trying to add values from a dropdown list in my gridview to another table.
Here is my scenario. I have 2 tables in my SQL Express DB. When editing the values of table2 in a gridview, I would like to show some data from table1 in a dropdown so users can select a value from table 1 and enter that value in table 2.
I have the Gridview setup to show table2 data.
I created a field template and inserted my dropdown list and linked it to my table1 data source.
When I run my web form, I can click to edit one of the fields in the gridview, and my dropdown list correctly displays the data from table 1, but when I try to update the table2 with the dropdown value, it doesn't correctly update. The row in table2 never updates.
posting the dropdown value from table 1 into the appropriate field in table2..
Again, I am new to this and have been following the tutorials etc on this site, but can't find one pertaining to this topic.
I have two tables for storing language translations - tblEN and tblES. They have the same structure which is nvcEnglish and nvcLocal - both nVarChar fields.
In nvcLocal of the Spanish table, I enter the Spanish translations of words and phrases used within my app. Problem is, when I add a bunch of new records to the English table I also have to go in and repeat the data entry into the Spanish table. I am wondering if there is a way to import the newly added records into the Spanish table using Transact SQL?The plain language query would be something like:
If the data in tblEN.nvcEnglish does not exist in tblES.nvcEnglish then insert a new row into tblES with the values from tblEN
I am working on a web app for an online photo album. It is the last project in Scott Mitchell's book: "ASP.Net 2.0 in 24 hours".
I am creating a page where users can enter new photo images. The functionality for uploading an image will come later. I am working on just inserting a new row into the Pictures table with an optional category, a required title and a required description.
I am getting an error when I try to insert a new row.
Here is a screenshot of the page with a shot of the dropdown list.
The Categories are user-specific. I am getting the correct values retrieved.
[URL]
There are two pretty simple database tables involved here.
NOTE: The CategoryID and PIctureID are both autoincrement integer columns.
[URL]
The page uses a DetailsView that uses a SqlDataSource that uses the Pictures table. (The DetailsView's Default Mode property is set to "Insert". The "Enable Inserting" checkbox is also checked.)
The dropdown list uses a dropdown control that uses a SqlDataSource that uses the Categories table.
When the "Insert" button is clicked the CategoryID value associated with selected (Category) Name on the dropdown list will be used along with the Title and Description values to insert a row in to the Pictures table. (If no Category value is selected, then a null value will be used for the CategoryID. This is OK because the CategoryID column in the Pictures table allows nulls.)
My problem is that I am getting this error:
Cannot insert explicit value for identity column in table 'Pictures' when IDENTITY_INSERT is set to OFF.
(FYI: I have the full version of both Visual Studio and SQL Server.)
I need to write a query to populate a gridview with minimum rates in ascending order for a month from three tables.For example i have three tables A,B,C as follows
TABLE A TABLE B TABLE C Id id id Quote_no Quote_no Quote_ no Name Rate1 Equip_name Rate2 E_rate Date R1_rate R2_rate Date
Now if the data is as follows
I need to get the Name from Table A ,minimum Rate1 and Rate2 values for a month in a dropdownlist from date field from Table B and the corresponding minimum rate(E_rate) for Equipment E1 and E2 only from Table C for the month in ascending order group by Name.
TABLE A
id Quote_no Name 1 101 XYZ
2 102 ABC TABLE B id Quote_no Rate1 Rate2 Date
1 101 105 200 12/11/2010
2 102 90 210 15/11/2010
TABLE C id Quote_no Equip_name E_rate R1_rate R2_Rate Date
Im creating a table dynamically in my codebehind to display some statistics. The table is in a usercontrol. When the page first loads, its created and displayed correctly. If I do something that generates a postback, the table subsequently disappears, this is because its created inside a !IsPostback. How can i ensure that the table, once its been generated, stays visble on the page ? I dont want to generate it each time the page loads as it involves a lot of calculations on the database which will slow the pageload down.
i have a table that has some columns and rows i want this table to have borders that are visible inside it i want every column an row to be closed in borders how can i do that?
[URL]above url contain a html table.I want to save this table value on XML and also want to save this table value on database MS2008.How to save html table values on database
I have an asp:Table and around the mid point of the table there is a DDL with values 2-5. What I want to do is add the selected amount of rows using AJAX right after the table row that has the DDL in it. I know how to dynamicly crate the rows, the info in the rows, and how to use AJAX to make things. Problem is I can not put the ContentTemplate tag inbetween the asp:TableRow which would mark the location I want the dynamic rows to start being added. I did some searching on here but most posts I find start with making the table from code and not the asp:Table tag
I'm assuming I need to use a pivot table from what I've found so far. However, every one that I've seen has not had the date setup like I have.
I have a Gridview on my page which I need to be populated like so
Date NCMR
1/1/10-1/31/10 #
2/1/10-2/28/10 #
I want to do this for 10 months... bottom record being the current month (or last month). I would also like the Date to format to January 2010 I used the above date format because that is how it is in the table. Basically, I need to know how to create the pivot table to search the table for 1/*/10, 2/*/10, etc