i would like someone to help me with this Handler in episerver 4.60. Is to request a property name and a pageid.
What means is when i run in the browser an address to show me the text from another page.
Sorry for my english
Here is the code:
using System;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using EPiServer;
using EPiServer.Core;
using EPiServer.Core.Html;
namespace Intranet.Handlers
{
public class EpiPropertyDataRetreiver : IHttpHandler
{
/// <summary>
/// You will need to configure this handler in the web.config file of your
/// web and register it with IIS before being able to use it. For more information
/// see the following link: http://go.microsoft.com/?linkid=8101007
/// </summary>
#region IHttpHandler Members
public bool IsReusable
{
// Return false in case your Managed Handler cannot be reused for another request.
// Usually this would be false in case you have some state information preserved per request.
get { return true; }
}
public void ProcessRequest(HttpContext context)
{
//HttpResponse response = context.Response;
//HttpRequest request = context.Request;
//HttpServerUtility server = context.Server;
var pageid = context.Request.QueryString["pageid"];
var propertyname = context.Request.QueryString["propertyname"];
int id = 11706;
DataFactory dataFactory = Global.EPDataFactory;
PageReference reference= new PageReference(id);
PageData pd = dataFactory.GetPage(reference);
string s = pd.Property[propertyname].ToString();
// get page from epi
// get property value that is in the page.
context.Response.Write("propertyname");
}
#endregion
}
}
Hello,
i would like someone to help me with this Handler in episerver 4.60. Is to request a property name and a pageid.
What means is when i run in the browser an address to show me the text from another page.
Sorry for my english
Here is the code: