|
Why not just return the columns you want in the first place?
However, if you insist... you could either set the appropriate columns' width to zero, or else create a dataview with the columns you want out of the datatable and simply bind the datatable to that - there is no need to bind it to the datatable at all.
Fred
|
|
|
|
|
Hi developers
I need to generate an RSS Feed like: http://www.carmagazine.co.uk/car.rss[^]. With options like Searching, Sorting etc... Any idea about this???
Furthermore how to read above RSS Feed in the same way with Searching and Sorting features. Also how to customize display of such feeds???
Thanks for your time
|
|
|
|
|
Its not that bad: Sorting / Searching comes inbuilt with it.
public XmlTextWriter CreateRSSFeed(XmlTextWriter writer)
{
DataTable articleTable = (DataTable)Session[Keys.ARTICLE_TABLE];
RSSService rssService = new RSSService();
writer = rssService.WriteRSSPrologue(writer);
foreach(DataRow articleRow in articleTable.Rows)
{
string articleID = articleRow["ArticleID"].ToString();
string title = articleRow["Title"].ToString();
string byLine = articleRow["ByLine"].ToString();
DateTime releaseDate = DateTime.Parse(articleRow["ReleaseDate"].ToString());
string articleLink = ConfigurationSettings.AppSettings[READ_ARTICLE_LINK];
articleLink = string.Format(articleLink,articleID);
writer = rssService.AddRSSItem(writer,title,articleLink,byLine,releaseDate);
}
writer = rssService.WriteRSSClosing(writer);
return writer;
}
public XmlTextWriter AddRSSItem(XmlTextWriter writer, string itemTitle, string itemLink, string itemByLine, DateTime releaseDate)
{
writer.WriteStartElement("item");
writer.WriteElementString("title",itemTitle);
writer.WriteElementString("link",itemLink);
writer.WriteElementString("description",itemByLine);
writer.WriteElementString("copyright","My Company");
writer.WriteElementString("pubDate",
releaseDate.ToString("r"));
writer.WriteEndElement();
return writer;
}
Hope this helps
|
|
|
|
|
To Display the RSS feed you need Feed reader. Its inbuilt in internet explorer 7.0.
Customization!! that will be a trick, will have to do google intensly.
|
|
|
|
|
Hi all,
I am displaying a report on my web applicatio using a crystal report viewer . when i try to export it it shows me another popup to select the type it shows only (i wanna export to excel) excel 97 to 2000. anyway when i select it and click ok it does not export the report.
it gives "System.FormatException: Input string was not in a correct format."
please tell me what is wrong.
Regrds
Ruwandi
rkherath
|
|
|
|
|
Hello to every One,
i'm using custom validator to check the textBox1 field and i'm also using the rang and required validator field for another textBox2..
Now when i click the button then all the rest field r being correct the custom validator feild doesnot show the error... nor it is shown in summary validator...
could u suggest me how should any one can change custom validator to client side validation....
Private Sub CustomValidator1_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
Dim i As Date
If Convert.ToDateTime(args.Value) > "12/2/2007" Then
args.IsValid = True
Else
args.IsValid = False
End If
End Sub
Plz mark the underline event can i change this to client validate and if yes how...?
Suggest me....
Thank You
|
|
|
|
|
yes you can change it to client side.
in your custom validator there is client side function where you can pass the function name.
You can find this in any book of asp.net
|
|
|
|
|
i am having 3 colums...In Mozilla i am getting Large spaces between each column..But in IE i am getting that correctly
I am getting the data to the html table dynamically from code..even the column names..
Pls tell me how to solve the problem
Goutham
|
|
|
|
|
A sample of the HTML / CSS might would be useful
|
|
|
|
|
If the rendering differs between browsers, it's almost always Mozilla that renders it correctly and Internet Explorer that doesn't. I have only ever seen one single occation where the opposite was true.
You have built your page to depend on some rendering bug in IE, so it will not render as intended in any other browser.
---
single minded; short sighted; long gone;
|
|
|
|
|
hai
iam stranger in AJAX.plz tell me how can i learn AJAX in beginer stage.iam in zero level.plz give me any link or text book name.
-- modified at 3:25 Tuesday 26th June, 2007
|
|
|
|
|
Begining ajax with asp.net -- works
very good book
|
|
|
|
|
|
|
What is zero level ? Have you done any web development at all ? Do you know javascript ?
If you want to have AJAX on your site, but not understand how it works, use the ASP.NET AJAX library. If you want to learn AJAX, go for 'AJAX in Action', a Manning book which will teach you how to write AJAX code.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Hi All
Does anyone know the procedure to Open edit and Save office documents in an Asp.Net application. What I am trying to ask is....
Suppose there is an application in which after you login you can view files and folders stored on a particular server...I have done all the things such as Creating new folder, Cut copy paste delete rename, Upload and Download. But I have do one more thing. That is to edit the office files. When the user clicks on any office document, it will ask to open or download. The user has to open it and the appklication will open in Word only. I have done till this. After that the user can edit the file and can save the same at the server directly which I can't able to do. If anyone had done this before then please let me know. Its very urgent. Any help will be appriciated......
Sagar Pattnayak
Software Developer
Sun-Dew Solutions
+91-9831169962
|
|
|
|
|
SKP24 wrote: After that the user can edit the file and can save the same at the server directly
In this scenario, the document edited is a local copy, and by no means the changes would not reflect into Server Copy from MS Word.
Why dont you make user to upload the document and check if the earlier version exists?
|
|
|
|
|
I have two dropdownlist.
I want to fill it using array by javascript.
One dropwdown will be bind with country name and other dropdownlist items will be changed on click of first dropdownlist which contains languages of perticular country .
Plz help me out
Thanks in advance
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
|
Hello to Every One,
How we can compare to test which date is greator of two.
Given a date and a variabble contaning another date
Suggest me...
Thank You
|
|
|
|
|
if(dateVariable > '26/06/2006')
greaterDate = dateVaraible;
else
greaterDate = DateTime.Parse('26/06/2006');
|
|
|
|
|
Hi all,
Can i create an file like abc.inc and store like the code segnment below.?
<br />
enum Colours<br />
{<br />
Blue, Green, Red<br />
};<br />
or
<br />
Blue<br />
Green<br />
Red<br />
Can you tell me how to include this abc.inc in the codebehind page.ie in default.aspx.cs file.
I know we can include files like this in classic ASP.
What will be best method to implement this?
Actually i want to display the options(color) red, green and blue in more than web page. When i make changes in the abc.inc file, that should reflect in the web page also.
waiting for your valuable suggestions
Thanks
Sebastian
-- modified at 1:13 Tuesday 26th June, 2007
|
|
|
|
|
Please don't cross post. As I've said before, if your code is in your project, it is visible to your page, ASP.NET is a real, OO development framework. ASP was a hack.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
OK. i was desperatly searvhing for a hint thats why.....
Thanks
Sebastian
|
|
|
|