Hi here is my question..
i am working on online crm 2011
in a custom entity form, i have a javascript for a field here is it:
function getfieldvalue()
{
var s = Xrm.Page.data.entity.attributes.get('new_name').getValue();
if(s == null)
{
alert('Field value is empty');
Xrm.Page.getAttribute("new_name").setValue('empty');
}
else
{
var url = 'http://localhost:1308/WebSite8/Default.aspx?namefield='+s; //Here is am passing the field value to aspx website
}
}
Here is a website code:
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Specialized;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
label1.Text = HttpContext.Current.Request.QueryString["s"];
//NameValueCollection n = Request.QueryString;
//Label2.Text = n.GetKey(0);
//Label3.Text = n.Get(0);
if (HttpContext.Current.Request.QueryString["s"] == null)
{
label1.Text = "null value in query string";
}
}
}
Request.querystring value is always null, Why is this. I checked that
custom field has value. Nomatter what value
"HttpContext.Current.Request.QueryString["s"]" always returns null, why
is this??
All i am trying to do is passing crm field value to aspx page and make use of that value in aspx page..
Plz can anyone correct my above code or provide any code to make use of crm field value in hosted aspx page.