web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

[SOLVED] ASP.NET components behavior problem

(0) ShareShare
ReportReport
Posted on by 240

Hi,

We're using Dynamics CRM 4 (update rollup 6) on Windows Server 2003 R2 SP2.

We have added an iframe on the Task form which links to a page hosted in the ISV folder of the web site.

This page includes :

  • two asp.label controls
  • two asp:DropDownList controls 
  • an asp:Calendar control
  • an asp:DataGrid control with an asp:ButtonColumn used to delete the specified row of the DataGrid.

We've got behavior problem with both these components :

  • we cannot browse for previous or next month ; when we click on the related link in the calendar's header, the calendar simply becomes invisible and all others controls (DropDownLists and DataGrid) become empty.
  • we cannot delete a particular row in the DataGrid ; when we click on the "Delete" link, we have the same problem as when we try to browse for previous or next month.
  • evrything is just working fine ; we are able to browse for previous or next months and to delete particular records in the Datagrid.

I tried several things, from creating a special application pool for my custom page, to modifying the web site's Session State's settings in the ASP.NET configuration page. None of the tricks I tried did solve the problem.

And I'm really stuck on this since I don't get the same result when I'm debugging.

Has anyone still had to deal with this kind of issue ? Thank's for replies.

*This post is locked for comments

I have the same question (0)
  • Grzegorz Kalek Profile Picture
    4,210 on at
    Hi Olivier, It looks like your page lacks viewstate. Create new web site on your iis server and open the page from there.
  • Olivier Philibert Profile Picture
    240 on at

    Hi Grzegorz, thank's for reply, I'll try to serve the page from another web site on the same physical server. But that doesn't really fit our need, which is to have the page hosted on the same web site as the CRM's one.

    So what I need would rather be an explanation on where to look for in order to make my page's viewstate act as it should ; since it's working in the Visual Studio's virtual server, I assume the problem is not in the code files, but rather in the configuration of the CRM's web site. But, at that time, I found nothing that could help me to check this configuration. Do I have to look for the web.config of the root ? Do I have to create a specific one for the ISV folder ? Do I have to create a separate application pool or can I run my solution in the CRM's one ? As I said I still tried several combinations and none did the trick.

    Anyway thank's for taking time to help me.

  • Grzegorz Kalek Profile Picture
    4,210 on at

    Everything should work fine with default CRM configuration. Check the viewstate using following code:

    <%@ Page EnableViewState="true" %>
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head runat="server">
    <script runat="server">
    protected void Page_Load(object sender, EventArgs e){
    if(!IsPostBack) ViewState["test"]="ViewState Working";
    string test=ViewState["test"] as string ?? "ViewState Not Working";
    if(IsPostBack) Response.Write(test);
    }
    </script>
    </head>
    <body>
    <form runat="server">
    <asp:Button id="bt1" runat="server" Text="Submit"/>
    <asp:Calendar id="cal1" runat="server"/>
    </form>
    </body>

  • Community Member Profile Picture
    on at
    Olivier, please try the following : enabling the viewstate for the custom asp.net component. Check my blogpost : http://www.brutusonline.nl/?p=393
  • Olivier Philibert Profile Picture
    240 on at

    Hi,

    I would like to thank both of you since your answers allowed me to make my custom page's ViewState working.

    Grzegorz, your hint allowed me to test if the core ViewState functionality is working. Bert-Jan, you were right : there must be a web.config file allowing the ViewState functionality for custom pages.

    No need to create a virtual directory, nor a separate application pool. Everything is working as far as ViewState is enabled in web.config AND the EnableViewState attribute is set in the Page tag of the aspx file.

     Kind regards.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans