Posts

Showing posts from December, 2011

ASP.Net with PHP : Session lost in iframe accessing php page P3P Issue

Image
ASP.Net with PHP : Session lost in iframe accessing php page


Problem: If you have iFrame or multiple frameset in your ASP.NET page, session is lost in the child frame. I have a php app running inside an iframe on an aspx webpage.
I pass a piece of info to this iframe through http parameters, php gets it and then set it in the session.  However, the session data is lost when I click submit button and postback occur in child frame . within the same php application works fine if i do not use iframe.


 ifdisplay.Attributes("src") = "http://191.254.1.42/cmg/upload.php?folder=" & destfolder & "&type=" & ddlType.SelectedValue & "&date=" & txtDate.Text & "&sub=" & txtSub.Text & "&eid=" & Session("eid").ToString & "-" & Request.UserHostAddress.ToString & "&uploadtype=" & Session("uploadtype")
            ifdisplay.Visible =…

ASP.Net: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% … %>)

ASP.Net: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% … %>)

I got this error when I was working on a small AJAX demo project the other day. In this project I only have 1 TextBox controls and 1 AJAX CalendarExtender controls: one text box is for a begin date entry controlled by one CalendarExtender. I had a little javascript in head tag to do some popup work:



<asp:Label ID="lblDate" runat="server" Text="Date (*):" Visible="False"></asp:Label></td><td>                       <asp:TextBox ID="txtDate" runat="server"                        ></asp:TextBox>                     <asp:CalendarExtender ID="CalendarExtender1" runat="server"                          TargetControlID="txtDate">                     </asp:CalendarExtender>
The scrip in head section was :

<script type="te…

Google+ Followers