.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Saving Page Source

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :ASP.Net
I am wondering if it is possible to programatically save a web page's page source.  Example:From website www.MyTestWebsite.com I want to save www.Google.com's Page Source to a string using C#.  Any suggestions?-NUStudent

View Complete Post

More Related Resource Links

SSIS And Sybase Source OLEDB connectivity issue with code page for character set

Hi I am using SSIS 2008 to connect the Sybase Server version 15.0.3 64-bit. The default character set id used by this Sybase server is 4 (i.e. roman8). (http://manuals.sybase.com/onlinebooks/group-charc/chg0300e/charsets/@Generic__BookTextView/1706;pt=266) I had installed Sybase Client for Sybase OLEDB Driver (ASEOLEDB) to integrate this in OLEDB Source Editor. As per guidance from one of the past MSDN forum discussion, I tried setting property of AlwaysUseDefaultCodePage property to "FALSE"  (http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/f5af9328-e1fb-48d7-a85d-1d08bb7cf0e5/). However, I am still experiencing error message as follows:- ********************************************************* Error at Package2 [Connection manager "xxxxxx.xxxxxxx"]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.  Source: "ASEOLEDB"  Hresult: 0x80004005  Description: "[00000] [Native Code: 30061] [ASEOLEDB]Could not load code page for requested charset". An OLE DB record is available.  Source: "ASEOLEDB"  Hresult: 0x80004005  Description: "[1ZZ001] [Native Code: 30016] [ASEOLEDB]Internal Error". Error at Data Flow Task 2 [OLE DB Source [1]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMC

Saving Page content

Hi All,
            i have a scenario where i need to save a web page content in sharepoint on click of button. I think there might be some JS function available in sharepoint to do this. I am not able to figure out which method does this.

can anyone help me in achieving this

Cheers :)

SharePoint Designer 2007 - Customize List View - Error when saving view ASPX page


We have a custom list definition that includes custom site columns.  When we try to open one of the list view aspx pages in SharePoint to update the view query we get an error when trying to save the page in SharePoint Designer 2007.  We receive a warning that the operation will customize the page from the site definition, which is fine.  And then get a general "Server error: ServiceRequestorID" alert.  ServiceRequestorID is a custom site column used by the list definition.

ServiceRequestorID field definition:

<Field ID="{FA39D24D-AB40-4b1d-BD80-94ABE34A7578}" Name="ServiceRequestorID" DisplayName="Service Requestor ID" StaticName="

Saving Date column from XML Source to SQL Destination


Hi, I'm trying to load data from an xml file to SQL Server table. I've columns of type DateTime in my xml file. I've used Data Conversion to convert the datetime column to DT_Date and trying to save/update the data using Slowly Changing Dimension, which is throwing an error:

    "[Derived Column [928]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Derived Column" (928)" failed because error code 0xC0049067 occurred, and the error row disposition on "input column "DATEVAL" (973)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure."

I've been trying to fix this thing by using all the data types that are related to dates(DBTIMESTAMP,DT_DBDATE, etc) but in vain. Can someone suggest me how to fix this.

Thanks in advance,


how will take the html controls value from source code to code behind of asp.net page


i created a calendar user control in asp.net+c#.it have two html text boxes and one img button.but i dont know ,how will take
the values to code behind of asp.net from html text boxes values at runtime on the onclick of html img button.....Any ideas????.

This is my main code


      <div>View from:</div>
         <div>  <input type="text" name="showdia" id="showdia" size="9" value="10/04/2010"><input onclick="return showCalendar('showdia', 'mm/dd/yyyy');"  type="image" src="images/cal.gif" align="absmiddle" name="reset" style="cursor:pointer"></div> 
         <div>  <input type="text" name="showdiafin" id="showdiafin" size="9" value="10/04/2010"><input onclick="return showCalendar('showdiafin', 'mm/dd/yyyy');" type="image" src="images/cal.gif" name="reset" style="cursor:pointer" align="absmiddle"></div>
    <div align="center" style="padding:3px;"> <img src="images/language/english/view.g

Saving sharepoint 2007 with fba page as a mht



I have Sharepoint 2007 server with FBA (i don't have access to the machine, can't run software on in, fba is well configured and working)

One of our client want to have some of the sites saved as a mht pages.

I was trying to use Interop.CDO but could not run it with fba authentication.

Any suggestion how to do it?

I can save this file as html using this code:

 using (AuthenticationSvc.Authentication authSvc = new AuthenticationSvc.Authentication())


    authSvc.Url = @"https://www.portal.com/_vti_bin/authentication.asmx";

    authSvc.CookieContainer = new System.Net.CookieContainer();

    authSvc.AllowAutoRedirect = true;

    Cookie cookie = new Cookie();

    AuthenticationSvc.LoginResult result = authSvc.Login("login", "pass");

    if (result.ErrorCode == AuthenticationSvc.LoginErrorCode.NoError)


     CookieCollection cookies = authSvc.CookieContainer.GetCookies(new Uri(authSvc.Url));

     cookie = cookie

When Saving a Page that Contains Javascript, the Content Rendered is Repeated


Each time I save a page that contains javascript, the content rendered is duplicated. For example, I added the following javascript (to display today's date) into a content editor web part:


<script language="JavaScript">
function mdy(todaysdate) {
//calls the function mdy why to get our date
return todaysdate.getMonth()+1+"/"+todaysdate.getDate()+"/"+todaysdate.getYear()
}</script><b><font size="2"><script language="JavaScript">
sampleDate1=new Date()
document.write ("Today's date is "+ mdy(sampleDate1))</script></font></b>


I then click on stop editing. When I go back to edit the page and then click on stop editing, "Todays date is ...." keeps repeating. This happens each time I edit the page.

Has anyone else encountered this problem? If not, do you know what could be causing it?

encrypt aspx page at client side view source

how can we encrypt ASPX page at client side view source ? So that nobody can see my controls and links.

Disable Page source


Hi friends,

        I have the requirement to protect the page source not only from right clicking but also View/page source.It must work in all browsers.

                   Ideas can also appreciated.

                                            Thanks in advance........

Register a script block to page without added to view source


Hi Experts,

I want to know do is there any way to register a script block to web page without the script code is added to view source?


Deployment problem - Saving your changes will customize a page from the site definition - what does




I have created a customized report viewer web part which is a subclass of Microsoft.ReportingServices.SharePoint.UI.WebParts.ReportViewerWebPart. This component works perfectly well when I use it to build web part pages but is causing problems when I try to deploy pages from one site to another. I have isolated the problem as follows:

1. Create a new web part page and add my control. Assign it a SSRS report and test - everything works!

2. Go into SharePoint designer and edit the web part page making any change - this includes adding and then removing a character so that the page is EXACTLY THE SAME as originally created through the SP site. Save the page and you will be prompted:

"Saving your changes will customize a page from the site definition. Are you sure you want to do this?"

Reply yes and re-open the page in the site and the web part now throws an error.

OK - so the page aspx code is exactly the same as it was originally so what does "Saving your changes will customize a page from the site definition" actually do and why does SPD think it needs to make this change?

I am hoping that if I understand this I will be able to work out how to fix my web part to deploy successfully!

Andrew Wiles - www.it-workplace.com - MDX made simple

web part connections don't remain when saving the page as template



I created a page layout containing 3 List view webparts connected by a page field filter web part.

When I create a page using this template, the filter doesn't have it's value so the connection is broken.

Please help me....


I need Urgent Help using Sql data source in my ASP page


can somebody tell me how to delete child records in the first step

check if there is no more child using count row number  if = 0  delete the key in parent table

parent table must have always child records in my case

by Using sql data source Delete tab

Source Revision Tool + Methodology for Single Page Application



My team is developing an ajax based "one page application" using several 3rd party controls. C# at the server side.

What is the recommanded tool (visual source safe? tortoise svn? tortoise hg? etc).

What is the methodology for team work with the tool (team leader responsible for check in's/ commit's and merges? developers are responsible for their user controls check in's? etc).

I'll greatly appreciate answer by someone with experience in such development.


Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

Microsoft StyleCop: Source Code Analyzer for C#

StyleCop is similar in many ways to Microsoft Code Analysis (specifically FxCop), but there are some important distinctions. FxCop performs its analysis on compiled binaries, while StyleCop analyzes the source code directly. For this reason, FxCop focuses more on the design of the code, while StyleCop focuses on layout, readability and documentation. Most of that information is stripped away during the compilation process, and thus cannot be analyzed by FxCop.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend