Think you are missing your MasterPage.. Try using your Master Page. Because to show the Menu you are Pasting your HtmlString into a Literal Control. So if you remove the MasterPage it won't work..
Literal Menu = (Literal)this.Master.FindControl("Literal1");
Menu.Text = sbMenu.ToString();
Think you are missing your MasterPage.. Try using your Master Page. Because to show the Menu you are Pasting your HtmlString into a Literal Control. So if you remove the MasterPage it won't work..
Literal Menu = (Literal)this.Master.FindControl("Literal1");
Menu.Text = sbMenu.ToString();
the masterpage is exist and work Correctly
this page without the all code above is showing normaly !
Then try putting a Debug point in your code and see what the HTML string is.. Then copy the string and then Paste the string in a text file and rename it as a.html.. See how it renders in a browser.
Then try putting a Debug point in your code and see what the HTML string is.. Then copy the string and then Paste the string in a text file and rename it as a.html.. See how it renders in a browser.
thx you
but There is somethingI did not mention it
The Site Work 100% in localhost the Errore Above showing just in the server (asy-warer.ps )!
sushanth009
Contributor
6243 Points
1168 Posts
Re: help please problem viewing the page in Asp.net
Feb 20, 2012 09:38 PM|LINK
Think you are missing your MasterPage.. Try using your Master Page. Because to show the Menu you are Pasting your HtmlString into a Literal Control. So if you remove the MasterPage it won't work..
Literal Menu = (Literal)this.Master.FindControl("Literal1"); Menu.Text = sbMenu.ToString();Ahmed206
Member
19 Points
10 Posts
Re: help please problem viewing the page in Asp.net
Feb 20, 2012 09:49 PM|LINK
the masterpage is exist and work Correctly
this page without the all code above is showing normaly !
sushanth009
Contributor
6243 Points
1168 Posts
Re: help please problem viewing the page in Asp.net
Feb 20, 2012 10:39 PM|LINK
Then try putting a Debug point in your code and see what the HTML string is.. Then copy the string and then Paste the string in a text file and rename it as a.html.. See how it renders in a browser.
MarvinYan
Member
56 Points
8 Posts
Re: help please problem viewing the page in Asp.net
Feb 21, 2012 12:37 AM|LINK
it seems a request validate issue, please try to add ValidateRequest="false" in your page direction of aspx file:
<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" %>
Ahmed206
Member
19 Points
10 Posts
Re: help please problem viewing the page in Asp.net
Feb 21, 2012 09:11 AM|LINK
thx you
but There is something I did not mention it
The Site Work 100% in localhost the Errore Above showing just in the server (asy-warer.ps )!
Ahmed206
Member
19 Points
10 Posts
Re: help please problem viewing the page in Asp.net
Feb 21, 2012 09:12 AM|LINK
i tried it does not resolve the problem :(
mhinkle2
Member
564 Points
519 Posts
Re: help please problem viewing the page in Asp.net
Feb 21, 2012 01:53 PM|LINK
I giving it a shot in the dark here but change the following line
public partial class Default4 : PageDataAccess
to
public partial class Default4 : System.Web.UI.Page
Also, Should the Default4 not be Default if the page is Default.aspx
Another words: public partial class Default : System.Web.UI.Page
I cannot see the source, but look at the top line it should say something like:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
What does the Inherits say: Default4 or Default
Sorry, but I'm not as familer with C#
mhinkle2
Member
564 Points
519 Posts
Re: help please problem viewing the page in Asp.net
Feb 21, 2012 02:23 PM|LINK
One other things: Check your page title line. It looks a little funky. Might be missing everything up.
Ahmed206
Member
19 Points
10 Posts
Re: help please problem viewing the page in Asp.net
Feb 21, 2012 04:11 PM|LINK
thx man but still not resolve
when i Remove This part of my code the page work Correctly !
Note:this code work Correctly in localhost but Not in The Server !!!
the part of code
XmlTextWriter Writer = new XmlTextWriter(Request.PhysicalApplicationPath.ToString() + "data" + "\\books.xml", null); Writer.WriteStartDocument(); Writer.Formatting = Formatting.Indented; Writer.WriteStartElement("books"); DataTable DT = DA.GETAlbums("2"); DataTable temp = DA.AlbumGetImagesWithVidios(DT.Rows[0]["AmazonCat"].ToString()); foreach (DataRow r3 in temp.Rows) { Writer.WriteStartElement("book"); Writer.WriteStartElement("title"); Writer.WriteCData(r3["Description"].ToString()); Writer.WriteFullEndElement(); Writer.WriteStartElement("image"); Writer.WriteAttributeString("width", "95"); Writer.WriteAttributeString("height", "115"); Writer.WriteStartElement("src"); Writer.WriteCData(@"../images/Data/Medium/" + r3["ImageFile"].ToString()); Writer.WriteFullEndElement(); Writer.WriteFullEndElement(); Writer.WriteStartElement("href"); Writer.WriteCData("#"); Writer.WriteFullEndElement(); Writer.WriteStartElement("reviews"); Writer.WriteStartElement("average_rating"); Writer.WriteString("5.0"); Writer.WriteEndElement(); Writer.WriteEndElement(); Writer.WriteFullEndElement(); } Writer.WriteEndElement(); Writer.Flush(); Writer.Close(); string path = ""; XmlTextWriter Writer = new XmlTextWriter(Request.PhysicalApplicationPath.ToString() + "data" + "\\c6.xml", null); Writer.WriteStartDocument(); Writer.Formatting = Formatting.Indented; Writer.WriteStartElement("slider"); DataTable DT = DA.GETAlbums("2"); DataTable temp = DA.AlbumGetImagesWithVidios(DT.Rows[0]["SliderCat"].ToString()); foreach (DataRow r3 in temp.Rows) { path = @"../images/Data/Large/" + r3["ImageFile"].ToString(); Writer.WriteStartElement("slide"); Writer.WriteStartElement("path"); Writer.WriteString(path); Writer.WriteEndElement(); Writer.Flush(); Writer.WriteEndElement(); } Writer.Flush(); Writer.Close();Hua-Jun Li -...
All-Star
75950 Points
5608 Posts
Re: help please problem viewing the page in Asp.net
Feb 22, 2012 04:20 AM|LINK
Hi,
I think it is the permission problem, you can assign the higer permisson for that folder.
If you use the window7, the account is the IIS_IUsers, if you use the window2003, the account is the NETWORK SERVICE.
You should assign the write permission for the folder.
Please check the following link:
http://msdn.microsoft.com/en-us/library/ff649309.aspx
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework