Using ASPX pages in sage CRM from within ASP pages???

By | June 3, 2009

As we all know that ASP is one of the very strong and powerful tools for making dynamic and interactive WebPages, CRM utilizes it in building its various inbuilt functionalities as well as we can do the Custom development in CRM using ASP as per the standards provided by Sage CRM.
From past few years DOT Net based languages are becoming very popular making the life of software programmer quite easy, as all the functions and methods are now available at the single click. So to make up with this new DOT Net era, Sage CRM has also come up with the new functionalities where we can make use of the DOT NET based languages to build our applications? We can create our own custom dot net dll’s and make them run on the button click from any sage CRM standard screen or pages. Also, using this we can build the page structure quite easily than that of the ASP pages.

Some time ago, we came across the requirement where the page design was quite complicated to be developed and maintained using the ASP pages. Then we all Greytrixians started tickling our minds how we can overcome this problem with some out of box concept?? The Only option that came in our mind was to make use of the ASPX pages and that too from within the ASP pages so that we can pass the parameters to and from the CRM properly.

Then our next step was to try the several options for using ASPX from within ASP. We tried redirecting from asp page to ASPX page, loading ASPX page on onload function, but nothing seems to work our way. Now, the only option that we could try was either using an IFRAME or POPUP a new window to see the ASPX page. We opted for the first option that is using an IFRAME as we can include it within the standard ASP page and also we can design the page graphics that matches with that of the parent ASP page so that it looks like the part of an ASP page. But, this is not the straight forward process and we need to follow some steps as mentioned below to do the same.

1. Develop your ASP.NET application completely.

2. Deploy the application created above in the IIS.

3. You can deploy your application at some other location also, but in this case you need to create New Virtual Directory under IIS pointing to this application and add the default pages under the documents tab such as Default.aspx.

4. Now, to see this ASPX page in ASP page you can create an URL like below and make your IFRAME to redirect to the same which resides inside that ASP page. The very important thing is here you will also need to keep track of the SID and pass it in the URL as shown below.

docurl=new String(document.URL);
arr= docurl.split(‘?’);
sid=arr[1];
sidArr = sid.split(‘&’)
sid = sidArr[0];
ASPXURL = ‘http://<Server Name>/TestDemoWebsite/Default.aspx?’+sid+’&<Pass the parameters here>

Note: Also you can transfer the entire CRM URL to the ASPX page for your reference.

If you find this useful, Please drop us a mail on crm@greytrix.com.