This is my Technical area of troubleshooting and learning new Programming skills and many more. Here you will find answers for many new technologies like asp.net 2.0/3.5,4.0 C# access, mysql, Amazon Webservice ,Sql-server, JD Edwards, SAS, Salesforce, APIs, MVC and many more. please visit & discuss.
Wednesday, April 30, 2008
CodeProject: Video Uploader to SQL Server Control. Free source code and programming help
CodeProject: Video Uploader to SQL Server Control. Free source code and programming help: "Video Uploader to SQL Server Control"
GridViewImages from DB in ASP.NET using C#. Free source code and programming help
CodeProject: GridViewImages from DB in ASP.NET using C#. Free source code and programming help: "GridViewImages from DB in ASP.NET using C#"
CodeProject: Integrating a Blogger.com Blog into an ASP.NET 2.0 Web Site. Free source code and programming help
CodeProject: Integrating a Blogger.com Blog into an ASP.NET 2.0 Web Site. Free source code and programming help: "Integrating a Blogger.com Blog into an ASP.NET 2.0 Web Site"
Tuesday, April 29, 2008
Problems with custom PagerTemplate and Gridview - ASP.NET Forums
Problems with custom PagerTemplate and Gridview - ASP.NET Forums: "Problems with custom PagerTemplate and Gridview"
Gridview PagerTemplate - First/Last, Prev/Next
Gridview PagerTemplate - ASP.NET Forums
<< First
< Prev [Records <%= GridView1.PageIndex * GridView1.PageSize %> - <%= GridView1.PageIndex * GridView1.PageSize + GridView1.PageSize - 1 %>]
Next >
Last >>
www.svdeals.com
www.svdeals.com
Monday, April 28, 2008
Menu Control with XmlDataSource not refreshing - ASP.NET Forums
Menu Control with XmlDataSource not refreshing - ASP.NET Forums: "Menu Control with XmlDataSource not refreshing"
ASP.NET 2.0: XmlDataSource - Default Caching Feature
ASP.NET 2.0: XmlDataSource - Default Caching Feature: "ASP.NET 2.0: XmlDataSource - Default Caching Feature"
XmlDataSource is a wonderful Data Source control used to bind hierarchial data. It can be combined with a TreeView to display a Tree structure of Data to the users.
While implementing XmlDataSource, we may not get the Data updated even though we change the underlying data, due to the built-in caching feature of this control.
Let us examine the following scenario.
We have a XML Fragment retrieved from Database based on a user input and set as the Data for the XmlDatasource. Then, when the user input changes, we would be getting a different XML Fragment from the Database. However, you will find that when you bind the XmlDataSoruce to a control, the data doesnt change.
This is because, by default, the EnableCaching propery is set to "true". You can also find that the CacheDuration is set to "Infinite". This forces the Data in the XmlDataSource to be cached and hence the change in the underlying Data, wont get reflected.
The resolution is to set the EnableCaching property to false or specify a CacheKeyDependency, or set the CacheDuration to a lesser time.
Since it is by default set for caching and we dont explicitly set it, it may be a little surprising to see the stale data when dealing with XmlDataSources.
This is not the same with other DataSources like SqlDataSource, ObjectDataSource etc., which have the EnableCaching property set to false, by default.
Cheers and Happy Programming !!!
http://www.svdeals.com/
XmlDataSource is a wonderful Data Source control used to bind hierarchial data. It can be combined with a TreeView to display a Tree structure of Data to the users.
While implementing XmlDataSource, we may not get the Data updated even though we change the underlying data, due to the built-in caching feature of this control.
Let us examine the following scenario.
We have a XML Fragment retrieved from Database based on a user input and set as the Data for the XmlDatasource. Then, when the user input changes, we would be getting a different XML Fragment from the Database. However, you will find that when you bind the XmlDataSoruce to a control, the data doesnt change.
This is because, by default, the EnableCaching propery is set to "true". You can also find that the CacheDuration is set to "Infinite". This forces the Data in the XmlDataSource to be cached and hence the change in the underlying Data, wont get reflected.
The resolution is to set the EnableCaching property to false or specify a CacheKeyDependency, or set the CacheDuration to a lesser time.
Since it is by default set for caching and we dont explicitly set it, it may be a little surprising to see the stale data when dealing with XmlDataSources.
This is not the same with other DataSources like SqlDataSource, ObjectDataSource etc., which have the EnableCaching property set to false, by default.
Cheers and Happy Programming !!!
http://www.svdeals.com/
Sunday, April 27, 2008
Datagrid basic operations on ASP .Net / C#
Datagrid basic operations on ASP .Net / C#: "Datagrid - Editing, Updating, Cancel, Selecting Rows"
created rss feed using access database, ASP.NET c#, webservices, this is live sample..
http://docs.google.com/Doc?id=dqwxgxp_25d252d4gj
created rss feed using access database, ASP.NET c#, webservices, this is live sample..
<%@ WebHandler Language="C#" Class="rss" %>
using System;using System.Web;using System.Data.OleDb;using System.Text;using System.Xml;
public class rss : IHttpHandler {
public void ProcessRequest(HttpContext context) {
string sTxt = BuildXmlString(); context.Response.ContentType = "text/xml"; context.Response.ContentEncoding = System.Text.Encoding.UTF8; context.Response.Write(sTxt); } private string BuildXmlString() { string sTitle = "Super Value Deals and Deals of The Day"; string sSiteUrl = "http://www.visli.com"; string sDescription = "Super Value Deals and Deals of The Day"; string sTTL = "60";
System.Text.StringBuilder oBuilder = new System.Text.StringBuilder(); oBuilder.Append(""); oBuilder.Append("");
oBuilder.Append(""); oBuilder.Append(sTitle); oBuilder.Append(" ");
oBuilder.Append(""); oBuilder.Append(sSiteUrl); oBuilder.Append("");
oBuilder.Append(""); oBuilder.Append(sDescription); oBuilder.Append(" ");
oBuilder.Append(""); oBuilder.Append(sTTL); oBuilder.Append(" ");
AppendItems(oBuilder);
oBuilder.Append(" "); return oBuilder.ToString(); }
public void AppendItems(System.Text.StringBuilder oBuilder) {
string connectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=c:\\xxxxxxxx\\database\\AbcDB.mdb"; OleDbConnection myOleDbConnection = new OleDbConnection(connectionString); OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand(); string ProdTy = "M2"; string Strsql = "SELECT top 101 * from vcxsd where ProdType='M2'";
myOleDbCommand.CommandText = Strsql; myOleDbConnection.Open();
OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader();
myOleDbDataReader.Read(); while (myOleDbDataReader.Read()) { string sTitle = "Super Value Deals and Deals of The Day"; string sLink = "http://www.visli.com/"; string sDescription = "Super Value Deals and Deals of The Day"; string sPubDate = "System.DateTime.Now";
oBuilder.Append("- ");
oBuilder.Append(""); oBuilder.Append(myOleDbDataReader["TextUrl"].ToString()); oBuilder.Append(" ");
oBuilder.Append(""); oBuilder.Append(myOleDbDataReader["NameUrl"].ToString()); oBuilder.Append(""); oBuilder.Append(""); oBuilder.Append("<img src=" + myOleDbDataReader["ImageUrl"].ToString() + ">" + "<br>" + myOleDbDataReader["Price"].ToString() + "<br>visit <a href=http://www.visli.com>http://www.visli.com</a>"); oBuilder.Append(" ");
oBuilder.Append(""); oBuilder.Append(myOleDbDataReader["UpdDate"].ToString()); oBuilder.Append(" ");
oBuilder.Append(" ");
} }
public bool IsReusable { get { return false; } }
}
Edit this page (you have permission) Edit this page (if you have permission) Report spam Google Docs -- Web word processing, presentations and spreadsheets.
created rss feed using access database, ASP.NET c#, webservices, this is live sample..
<%@ WebHandler Language="C#" Class="rss" %>
using System;using System.Web;using System.Data.OleDb;using System.Text;using System.Xml;
public class rss : IHttpHandler {
public void ProcessRequest(HttpContext context) {
string sTxt = BuildXmlString(); context.Response.ContentType = "text/xml"; context.Response.ContentEncoding = System.Text.Encoding.UTF8; context.Response.Write(sTxt); } private string BuildXmlString() { string sTitle = "Super Value Deals and Deals of The Day"; string sSiteUrl = "http://www.visli.com"; string sDescription = "Super Value Deals and Deals of The Day"; string sTTL = "60";
System.Text.StringBuilder oBuilder = new System.Text.StringBuilder(); oBuilder.Append(""); oBuilder.Append("
oBuilder.Append("
oBuilder.Append(""); oBuilder.Append(sSiteUrl); oBuilder.Append("");
oBuilder.Append("
oBuilder.Append("
AppendItems(oBuilder);
oBuilder.Append("
public void AppendItems(System.Text.StringBuilder oBuilder) {
string connectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=c:\\xxxxxxxx\\database\\AbcDB.mdb"; OleDbConnection myOleDbConnection = new OleDbConnection(connectionString); OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand(); string ProdTy = "M2"; string Strsql = "SELECT top 101 * from vcxsd where ProdType='M2'";
myOleDbCommand.CommandText = Strsql; myOleDbConnection.Open();
OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader();
myOleDbDataReader.Read(); while (myOleDbDataReader.Read()) { string sTitle = "Super Value Deals and Deals of The Day"; string sLink = "http://www.visli.com/"; string sDescription = "Super Value Deals and Deals of The Day"; string sPubDate = "System.DateTime.Now";
oBuilder.Append("
oBuilder.Append("
oBuilder.Append(""); oBuilder.Append(myOleDbDataReader["NameUrl"].ToString()); oBuilder.Append(""); oBuilder.Append("
oBuilder.Append("
oBuilder.Append("
} }
public bool IsReusable { get { return false; } }
}
Edit this page (you have permission) Edit this page (if you have permission) Report spam Google Docs -- Web word processing, presentations and spreadsheets.
Saturday, April 26, 2008
caching your files
All operators are currently assisting others. You are currently 1 of 1. Thanks for your patience.
All operators are currently assisting others. You are currently 1 of 2. Thanks for your patience.
You are now chatting with 'Patrick'
Patrick: Welcome to Brinkster, how may I help you today?
visli: Hi I am displaying rss feed informatiom on my website .. on my live website its displaying old informaton but on my local machine its correct.. check this out
visli: www.visli.com
visli: deals of the day
visli: any suggestion??
Patrick: Your browser is possibly caching your files. To turn this feature off in Internet Explorer, go to Tools -> Internet Options, under Temporary Internet Files click Settings, and then select "Every Visit to Page". Also, please click on the delete files button. This will remove all temporary Internet files from your computer.
Patrick: In Internet Explorer, click Tools -> Internet options. Under Browsing History click Delete. Click the Delete Files button. Click Close and then OK to return to the browser.
visli: ok
visli: is it possible this to do programatically
Patrick: You can set firefox to clear the catch every time it closes.
visli: thnaks bye.
All operators are currently assisting others. You are currently 1 of 2. Thanks for your patience.
You are now chatting with 'Patrick'
Patrick: Welcome to Brinkster, how may I help you today?
visli: Hi I am displaying rss feed informatiom on my website .. on my live website its displaying old informaton but on my local machine its correct.. check this out
visli: www.visli.com
visli: deals of the day
visli: any suggestion??
Patrick: Your browser is possibly caching your files. To turn this feature off in Internet Explorer, go to Tools -> Internet Options, under Temporary Internet Files click Settings, and then select "Every Visit to Page". Also, please click on the delete files button. This will remove all temporary Internet files from your computer.
Patrick: In Internet Explorer, click Tools -> Internet options. Under Browsing History click Delete. Click the Delete Files button. Click Close and then OK to return to the browser.
visli: ok
visli: is it possible this to do programatically
Patrick: You can set firefox to clear the catch every time it closes.
visli: thnaks bye.
Previous and next buttons in the grid view's pager
Previous and next buttons in the grid view's pager: "Flaw with buttons in GridView pager"
Friday, April 25, 2008
How To sell your stuff on Amazon.com | eHow.com
Amazon.com has a great feature where you can enter your stuff into their seller’s marketplace allowing you to post your books/clothes/toys/whatever into their virtual marketplace and while buyers are scrolling through the products they want to buy they can choose your item if the price is right. It's a great way to get some money out of items you don't need or want anymore and you can usually make more than you would at a yard sale or reseller's shop.
How To sell your stuff on Amazon.com eHow.com: "How to sell your stuff on Amazon.com"
Things You’ll Need:
A computer with an internet connection.
an Amazon.com (they are easy to set up and you will be prompted through setting one up during the posting of your items if you do not already have one.
Something to sell
Step1Go to Amazon.com and on their home page, look to the bottom left side where you’ll find “Selling on Amazon”. Click on the link “Sell Your Stuff”
Step2You will then be taken to the “Sell Your Stuff and make money – it’s that easy” page. This is where they tell you that you can “Earn cash by selling your pre-owned items on Amazon.com. It’s easy, it’s fast, and it doesn’t cost you a penny until your item sells”.
Step3Just below the welcome, there will be a box where you will list the item you would like to sell. Amazon has 18 categories from books, sporting goods, automotive, and more categories including one called “everything else”.
Step4Search by title or keyword to find your exact item in their marketplace. Once you have don’t this, click on the “Start Selling” button.
Step5You will then be taken to the page which shows all items that are relevant to your keyword or title. Depending on your item, you may see one or multiple items to choose from. Once you have found your item, click to the right on the “Sell Yours Here” button.
Step6You will next verify the item you are selling, select the item’s condition and then if you would like add comments about the condition of your item. Once you are ready, click on the “continue” button at the bottom of the page.
Step7On this next page you will enter the price for your item, the quantity o you have to sell, your location, and select your shipping methods. OK what about the shipping? Amazon.com will credit you for the cost of shipping. There are preset credits for each shipping method so you are not out the money of shipping.
Step8Once you have completed this you will be taken to the sign-in page. If you have an Amazon.com account, you will sign into it here, or you can create one. Follow the prompts.
Step9Once you are ready, click on the “Submit your Listing” button at the bottom of the page and your item will be listed in the Amazon.com Marketplace.
Step10Once your item sells, Amazon.com will immediately send you an email alerting you of the sale. You can follow their easy-to-understand and follow instructions. You need to send your item within two business days and after the buyer confirms to Amazon that they’ve received your item—Amazon will transfer the money to your account. You will receive the price of your item + a credit for shipping – Amazon’s small commission.
How To sell your stuff on Amazon.com eHow.com: "How to sell your stuff on Amazon.com"
Things You’ll Need:
A computer with an internet connection.
an Amazon.com (they are easy to set up and you will be prompted through setting one up during the posting of your items if you do not already have one.
Something to sell
Step1Go to Amazon.com and on their home page, look to the bottom left side where you’ll find “Selling on Amazon”. Click on the link “Sell Your Stuff”
Step2You will then be taken to the “Sell Your Stuff and make money – it’s that easy” page. This is where they tell you that you can “Earn cash by selling your pre-owned items on Amazon.com. It’s easy, it’s fast, and it doesn’t cost you a penny until your item sells”.
Step3Just below the welcome, there will be a box where you will list the item you would like to sell. Amazon has 18 categories from books, sporting goods, automotive, and more categories including one called “everything else”.
Step4Search by title or keyword to find your exact item in their marketplace. Once you have don’t this, click on the “Start Selling” button.
Step5You will then be taken to the page which shows all items that are relevant to your keyword or title. Depending on your item, you may see one or multiple items to choose from. Once you have found your item, click to the right on the “Sell Yours Here” button.
Step6You will next verify the item you are selling, select the item’s condition and then if you would like add comments about the condition of your item. Once you are ready, click on the “continue” button at the bottom of the page.
Step7On this next page you will enter the price for your item, the quantity o you have to sell, your location, and select your shipping methods. OK what about the shipping? Amazon.com will credit you for the cost of shipping. There are preset credits for each shipping method so you are not out the money of shipping.
Step8Once you have completed this you will be taken to the sign-in page. If you have an Amazon.com account, you will sign into it here, or you can create one. Follow the prompts.
Step9Once you are ready, click on the “Submit your Listing” button at the bottom of the page and your item will be listed in the Amazon.com Marketplace.
Step10Once your item sells, Amazon.com will immediately send you an email alerting you of the sale. You can follow their easy-to-understand and follow instructions. You need to send your item within two business days and after the buyer confirms to Amazon that they’ve received your item—Amazon will transfer the money to your account. You will receive the price of your item + a credit for shipping – Amazon’s small commission.
CodeGuru: .NET Web Services Tutorial
CodeGuru: .NET Web Services Tutorial: "NET Web Services Tutorial"
Thursday, April 24, 2008
Building a newsletter management system using ASP.NET and C#
Building a newsletter management system using ASP.NET and C#: "Building a newsletter management service in ASP.NET"
Wednesday, April 23, 2008
Tuesday, April 22, 2008
How do I justify text on both sides on Web pages?
How do I justify text on both sides on Web pages?: "How do I justify text on both sides on Web pages?"
Monday, April 21, 2008
Sunday, April 20, 2008
Google Calendar APIs and Tools
API Developer's Guide: The Protocol - Google Calendar APIs and Tools - Google Code: "Google Calendar APIs and Tools"
Audience
Terms of use
Authenticating to the Calendar service
AuthSub proxy authentication
ClientLogin username/password authentication
Magic cookie authentication
Retrieving calendar lists New!
Retrieving all calendars
Retrieving only calendars that a user owns
Managing calendars New!
Creating new calendars
Updating existing calendars
Deleting calendars
Managing subscriptions to calendars New!
Adding new subscriptions
Updating calendar subscriptions
Deleting subscriptions
Retrieving events
Retrieving events without query parameters
Retrieving events for a specified date range
Retrieving events matching a full text query
Creating events
Creating single-occurrence events
Creating quick add events
Creating Calendar Gadgets New!
Creating recurring events
Updating events
Deleting events
Performing multiple operations with a batch requestNew!
Sharing calendars
Retrieving access control lists
Retrieving a rule
Adding a user to an access control list
Updating a user's role in an access control list
Removing a user from an access control list
Additional operations
Extended properties
Reminders and Notifications
Audience
Terms of use
Authenticating to the Calendar service
AuthSub proxy authentication
ClientLogin username/password authentication
Magic cookie authentication
Retrieving calendar lists New!
Retrieving all calendars
Retrieving only calendars that a user owns
Managing calendars New!
Creating new calendars
Updating existing calendars
Deleting calendars
Managing subscriptions to calendars New!
Adding new subscriptions
Updating calendar subscriptions
Deleting subscriptions
Retrieving events
Retrieving events without query parameters
Retrieving events for a specified date range
Retrieving events matching a full text query
Creating events
Creating single-occurrence events
Creating quick add events
Creating Calendar Gadgets New!
Creating recurring events
Updating events
Deleting events
Performing multiple operations with a batch requestNew!
Sharing calendars
Retrieving access control lists
Retrieving a rule
Adding a user to an access control list
Updating a user's role in an access control list
Removing a user from an access control list
Additional operations
Extended properties
Reminders and Notifications
Google Data APIs - Google Code
Google Data APIs - Google Code
Many Google services support the Google data API protocol. The following data APIs allow your client applications to interact with Google services:
Google Apps APIs
Google Base data API
Blogger data API
Google Calendar data API
Google Code Search data API
Google Contacts data API
Google Notebook data API
Google Spreadsheets data API
Picasa Web Albums data API
Google Documents List data API
YouTube data API
Many Google services support the Google data API protocol. The following data APIs allow your client applications to interact with Google services:
Google Apps APIs
Google Base data API
Blogger data API
Google Calendar data API
Google Code Search data API
Google Contacts data API
Google Notebook data API
Google Spreadsheets data API
Picasa Web Albums data API
Google Documents List data API
YouTube data API
youtube's new api with code sample C# asp.net
Hi
I created page by using new google web service api for youtube C#, asp.net 2.0 , check this out for live sample and complete code:
http://svdeals.com/youtube.aspx?searchtxt=visli
please live your comments.
thanks
Dost.
I created page by using new google web service api for youtube C#, asp.net 2.0 , check this out for live sample and complete code:
http://svdeals.com/youtube.aspx?searchtxt=visli
please live your comments.
thanks
Dost.
Friday, April 18, 2008
Wednesday, April 16, 2008
New Youtube: Data API Protocol - YouTube APIs and Tools - Google Code
Audience
About this document
Authentication
Using a developer key and client ID
AuthSub for web applications
ClientLogin for installed applications
Understanding video feeds and entries
Displaying a list of videos
Identifying feeds related to a feed entry
Displaying information about a video
Retrieving and searching for videos
Standard video feeds
Videos uploaded by a specific user
Related videos
Browsing with categories and keywords
Searching for videos
Uploading videos
Process flow diagrams
AuthSub authentication
ClientLogin authentication
Browser-based upload
Direct upload
Technical requirements for uploaded videos
Assigning developer tags
Browser-based uploading
Step 1 - Uploading video metadata
Variables in the upload request
Step 2 - Extracting values from the API response
Step 3 - Uploading the video file
Direct uploading
Sending an Upload API Request
Variables in the upload request
Handling the Upload API Response
Checking the status of an uploaded video
Updating and deleting videos
Updating a video entry
Deleting a video
Using community features
Adding a rating
Comments
Retrieving comments for a video
Adding a comment in response to a video
Video responses
Retrieving a list of video responses
Adding a video response
Deleting a video response
Adding a complaint
Sharing videos with other users
Saving and collecting videos
Favorite videos
Retrieving a user's favorite videos
Adding a favorite video
Deleting a favorite video
Playlists
Retrieving a user's playlists
Retrieving a single playlist
Adding a playlist
Updating a playlist
Adding a video to a playlist
Editing video information in a playlist
Removing a video from a playlist
Deleting a playlist
Subscriptions
Retrieving a user's subscriptions
Adding a subscription
Deleting a subscription
Enabling user interaction
User profiles
Retrieving a user's profile
Contacts
Retrieving a user's contacts
Adding a contact
Updating a contact
Deleting a contact
Understanding API error responses
Validation errors
Quota errors
Authentication errors
Revision History
www.visli.com
About this document
Authentication
Using a developer key and client ID
AuthSub for web applications
ClientLogin for installed applications
Understanding video feeds and entries
Displaying a list of videos
Identifying feeds related to a feed entry
Displaying information about a video
Retrieving and searching for videos
Standard video feeds
Videos uploaded by a specific user
Related videos
Browsing with categories and keywords
Searching for videos
Uploading videos
Process flow diagrams
AuthSub authentication
ClientLogin authentication
Browser-based upload
Direct upload
Technical requirements for uploaded videos
Assigning developer tags
Browser-based uploading
Step 1 - Uploading video metadata
Variables in the upload request
Step 2 - Extracting values from the API response
Step 3 - Uploading the video file
Direct uploading
Sending an Upload API Request
Variables in the upload request
Handling the Upload API Response
Checking the status of an uploaded video
Updating and deleting videos
Updating a video entry
Deleting a video
Using community features
Adding a rating
Comments
Retrieving comments for a video
Adding a comment in response to a video
Video responses
Retrieving a list of video responses
Adding a video response
Deleting a video response
Adding a complaint
Sharing videos with other users
Saving and collecting videos
Favorite videos
Retrieving a user's favorite videos
Adding a favorite video
Deleting a favorite video
Playlists
Retrieving a user's playlists
Retrieving a single playlist
Adding a playlist
Updating a playlist
Adding a video to a playlist
Editing video information in a playlist
Removing a video from a playlist
Deleting a playlist
Subscriptions
Retrieving a user's subscriptions
Adding a subscription
Deleting a subscription
Enabling user interaction
User profiles
Retrieving a user's profile
Contacts
Retrieving a user's contacts
Adding a contact
Updating a contact
Deleting a contact
Understanding API error responses
Validation errors
Quota errors
Authentication errors
Revision History
www.visli.com
Tuesday, April 15, 2008
E Pluriblog Unum: Merging RSS Feeds
E Pluriblog Unum: Merging RSS Feeds: "E Pluriblog Unum: Merging RSS Feeds"
PagerSettings.Mode Property (System.Web.UI.WebControls)
PagerSettings.Mode Property (System.Web.UI.WebControls): "PagerSettings..::.Mode Property"
Monday, April 14, 2008
Replace C# (chr(13), cha(146)
temp+=temp.Replace(chr(13),"<br>"); - MSDN Forums
temp = temp.Replace("" + (char)13, "
");
temp = temp.Replace("" + (char)0x0D, "
");
temp = temp.Replace(((char)0x0D).ToString(), "
");
//I'd use this: temp = temp.Replace("\r", "
");The latter looks far easiest.
temp = temp.Replace("" + (char)13, "
");
temp = temp.Replace("" + (char)0x0D, "
");
temp = temp.Replace(((char)0x0D).ToString(), "
");
//I'd use this: temp = temp.Replace("\r", "
");The latter looks far easiest.
Friday, April 11, 2008
Creating an RSS feed for your site using Asp.net,C#,Access database
Create a new Item in visual stdios 2005 generic handler( *.ashx ).
Live code example is following:
using System;
using System.Web;
using System.Data.OleDb;
using System.Text;
using System.Xml;
public class rss : IHttpHandler {
public void ProcessRequest(HttpContext context)
{
string sTxt = BuildXmlString();
context.Response.ContentType = "text/xml";
context.Response.ContentEncoding = System.Text.Encoding.UTF8;
context.Response.Write(sTxt);
}
private string BuildXmlString()
{
string sTitle = "Super Value Deals and Deals of The Day";
string sSiteUrl = "http://www.visli.com";
string sDescription = "Super Value Deals and Deals of The Day";
string sTTL = "60";
System.Text.StringBuilder oBuilder = new System.Text.StringBuilder();
oBuilder.Append("");
oBuilder.Append("");
oBuilder.Append("");
oBuilder.Append(sTitle);
oBuilder.Append(" ");
oBuilder.Append("");
oBuilder.Append(sSiteUrl);
oBuilder.Append("");
oBuilder.Append("");
oBuilder.Append(sDescription);
oBuilder.Append(" ");
oBuilder.Append("");
oBuilder.Append(sTTL);
oBuilder.Append(" ");
AppendItems(oBuilder);
oBuilder.Append(" ");
return oBuilder.ToString();
}
public void AppendItems(System.Text.StringBuilder oBuilder)
{
string connectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=c:\\sites\\Single15\\visli\\database\\AmazonDB.mdb";
OleDbConnection myOleDbConnection = new OleDbConnection(connectionString);
OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand();
string ProdTy = "M2";
string Strsql = "SELECT top 15 * from DetailUrl where ProdType='M2'";
myOleDbCommand.CommandText = Strsql;
myOleDbConnection.Open();
OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader();
myOleDbDataReader.Read();
while (myOleDbDataReader.Read())
{
string sTitle = "Super Value Deals and Deals of The Day";
string sLink = "http://www.visli.com/";
string sDescription = "Super Value Deals and Deals of The Day";
string sPubDate = "System.DateTime.Now";
oBuilder.Append("- ");
oBuilder.Append("");
oBuilder.Append(myOleDbDataReader["TextUrl"].ToString());
oBuilder.Append(" ");
oBuilder.Append("");
oBuilder.Append(myOleDbDataReader["NameUrl"].ToString());
oBuilder.Append("");
oBuilder.Append("");
oBuilder.Append("<img src=" + myOleDbDataReader["ImageUrl"].ToString() + ">" + "<br>" + myOleDbDataReader["Price"].ToString() + "<br>visit <a href=http://www.visli.com>http://www.visli.com</a>");
oBuilder.Append(" ");
oBuilder.Append("");
oBuilder.Append(myOleDbDataReader["UpdDate"].ToString());
oBuilder.Append(" ");
oBuilder.Append(" ");
}
}
public bool IsReusable {
get {
return false;
}
}
}
Thanks to asp.net forum
Live code example is following:
using System;
using System.Web;
using System.Data.OleDb;
using System.Text;
using System.Xml;
public class rss : IHttpHandler {
public void ProcessRequest(HttpContext context)
{
string sTxt = BuildXmlString();
context.Response.ContentType = "text/xml";
context.Response.ContentEncoding = System.Text.Encoding.UTF8;
context.Response.Write(sTxt);
}
private string BuildXmlString()
{
string sTitle = "Super Value Deals and Deals of The Day";
string sSiteUrl = "http://www.visli.com";
string sDescription = "Super Value Deals and Deals of The Day";
string sTTL = "60";
System.Text.StringBuilder oBuilder = new System.Text.StringBuilder();
oBuilder.Append("");
oBuilder.Append("
oBuilder.Append("
oBuilder.Append(sTitle);
oBuilder.Append("
oBuilder.Append("");
oBuilder.Append(sSiteUrl);
oBuilder.Append("");
oBuilder.Append("
oBuilder.Append(sDescription);
oBuilder.Append("
oBuilder.Append("
oBuilder.Append(sTTL);
oBuilder.Append("
AppendItems(oBuilder);
oBuilder.Append("
return oBuilder.ToString();
}
public void AppendItems(System.Text.StringBuilder oBuilder)
{
string connectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=c:\\sites\\Single15\\visli\\database\\AmazonDB.mdb";
OleDbConnection myOleDbConnection = new OleDbConnection(connectionString);
OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand();
string ProdTy = "M2";
string Strsql = "SELECT top 15 * from DetailUrl where ProdType='M2'";
myOleDbCommand.CommandText = Strsql;
myOleDbConnection.Open();
OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader();
myOleDbDataReader.Read();
while (myOleDbDataReader.Read())
{
string sTitle = "Super Value Deals and Deals of The Day";
string sLink = "http://www.visli.com/";
string sDescription = "Super Value Deals and Deals of The Day";
string sPubDate = "System.DateTime.Now";
oBuilder.Append("
oBuilder.Append("
oBuilder.Append(myOleDbDataReader["TextUrl"].ToString());
oBuilder.Append("
oBuilder.Append("");
oBuilder.Append(myOleDbDataReader["NameUrl"].ToString());
oBuilder.Append("");
oBuilder.Append("
oBuilder.Append("<img src=" + myOleDbDataReader["ImageUrl"].ToString() + ">" + "<br>" + myOleDbDataReader["Price"].ToString() + "<br>visit <a href=http://www.visli.com>http://www.visli.com</a>");
oBuilder.Append("
oBuilder.Append("
oBuilder.Append(myOleDbDataReader["UpdDate"].ToString());
oBuilder.Append("
oBuilder.Append("
}
}
public bool IsReusable {
get {
return false;
}
}
}
Thanks to asp.net forum
Creating an RSS feed for your ASP.NET site
Creating an RSS feed for your ASP.NET site: "Creating an RSS feed for your ASP.NET site"
Thursday, April 10, 2008
15 Seconds : Creating a .NET Web Service
15 Seconds : Creating a .NET Web Service: "Creating a .NET Web Service"
Data Access in .NET using C#
Page 3 - Data Access in .NET using C#: Part 1: "Data Access in .NET using C#: Part 1 - The DataReader Object"
Live example...
protected void Page_Load(object sender, EventArgs e)
{
string connectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=c:\\sites\\Single15\\visli\\database\\Olddb.mdb";
OleDbConnection myOleDbConnection = new OleDbConnection(connectionString);
OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand();
myOleDbCommand.CommandText = "SELECT * from DetailUrl";
myOleDbConnection.Open();
OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader();
myOleDbDataReader.Read();
// dbReader = myOleDbDataReader.Read();
while (myOleDbDataReader.Read())
{
Response.Write(myOleDbDataReader["urlno"]);
Response.Write("
");
}
myOleDbDataReader.Close();
myOleDbConnection.Close();
}
Live example...
protected void Page_Load(object sender, EventArgs e)
{
string connectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source=c:\\sites\\Single15\\visli\\database\\Olddb.mdb";
OleDbConnection myOleDbConnection = new OleDbConnection(connectionString);
OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand();
myOleDbCommand.CommandText = "SELECT * from DetailUrl";
myOleDbConnection.Open();
OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader();
myOleDbDataReader.Read();
// dbReader = myOleDbDataReader.Read();
while (myOleDbDataReader.Read())
{
Response.Write(myOleDbDataReader["urlno"]);
Response.Write("
");
}
myOleDbDataReader.Close();
myOleDbConnection.Close();
}
How to use an OleDbConnection object to connect to an Access database : Access « Database ADO.net « C# / C Sharp
How to use an OleDbConnection object to connect to an Access database : Access « Database ADO.net « C# / C Sharp: "How to use an OleDbConnection object to connect to an Access database"
Wednesday, April 9, 2008
Youtube - new APIs
Youtube - new APIs
http://gdata.youtube.com/feeds/videos?vq=visli&orderby=updated
http://gdata.youtube.com/feeds/users/Yaarind/uploads?vq=americanidols
http://gdata.youtube.com/feeds/users/nbc/playlists
Reference guide
http://code.google.com/apis/youtube/overview.html
http://www.svdeals.com/ deals of the day.
http://gdata.youtube.com/feeds/videos?vq=visli&orderby=updated
http://gdata.youtube.com/feeds/users/Yaarind/uploads?vq=americanidols
http://gdata.youtube.com/feeds/users/nbc/playlists
Reference guide
http://code.google.com/apis/youtube/overview.html
http://www.svdeals.com/ deals of the day.
Tuesday, April 8, 2008
CSS Control Adapter Toolkit for ASP.NET 2.0 - ScottGu's Blog
CSS Control Adapter Toolkit for ASP.NET 2.0 - ScottGu's Blog: "CSS Control Adapter Toolkit for ASP.NET 2.0"
sales force web-to-lead form custom field validation Live example
input id="00N70000001xxx" name="00N70000001xxx" size="12" type="text" onblur="validateDate(this);"
if(document.getElementById('00N70000001vxxx').value=='' )
{
alert('Invalid Blank');
return false;
}
if(document.getElementById('00N70000001vxxx').value=='' )
{
alert('Invalid Blank');
return false;
}
Saturday, April 5, 2008
Friday, April 4, 2008
Wednesday, April 2, 2008
SEO Masterpage Keywords description
ASP.NET, AJAX, Web Services, Vista, Visual Studio, and Some Random Thoughts - Nothing Personal Here!!!
live example
HtmlMeta metaDesc = new HtmlMeta();
metaDesc.Name = "description";
metaDesc.Content = "Tips on roasting coffee at home";
Page.Header.Controls.Add(metaDesc);
HtmlMeta metaKey = new HtmlMeta();
metaKey.Name = "keywords";
metaKey.Content = "roast, coffee, home, tips";
Page.Header.Controls.Add(metaKey);
metaKey.Content = "aaaaroast, xxxxcoffee, xxxxxhome, xxxxtips" + Request["prdty"];
Page.Header.Controls.Add(metaKey);
live example
HtmlMeta metaDesc = new HtmlMeta();
metaDesc.Name = "description";
metaDesc.Content = "Tips on roasting coffee at home";
Page.Header.Controls.Add(metaDesc);
HtmlMeta metaKey = new HtmlMeta();
metaKey.Name = "keywords";
metaKey.Content = "roast, coffee, home, tips";
Page.Header.Controls.Add(metaKey);
metaKey.Content = "aaaaroast, xxxxcoffee, xxxxxhome, xxxxtips" + Request["prdty"];
Page.Header.Controls.Add(metaKey);
Tuesday, April 1, 2008
BULK INSERT
BULK INSERT: "BULK INSERT"
BULK INSERT Northwind.dbo.[Order Details]
FROM 'f:\orders\lineitem.tbl'
WITH
(
FIELDTERMINATOR = '',
ROWTERMINATOR = ':\n',
FIRE_TRIGGERS
)
www.svdeals.com
BULK INSERT Northwind.dbo.[Order Details]
FROM 'f:\orders\lineitem.tbl'
WITH
(
FIELDTERMINATOR = '',
ROWTERMINATOR = ':\n',
FIRE_TRIGGERS
)
www.svdeals.com
Subscribe to:
Posts (Atom)