Thursday, December 18, 2008

Stop Refresh in Master / Child Page.

instead of using Master page use frame set to avoid refresh when click from menu to open a page
Steps:
1. add a webpage in ur application
2. add following code in design
< head runat="server">
< title>Untitled Page< /title>
< /head>

< frameset framespacing ="0" rows="100,*,50" noresize="yes">
< frame name="menu" src="headerpage.aspx" noresize scrolling="no" />
< frame name="content" src="" scrolling="auto" />
< frame name="footer" src="footerpage.aspx" noresize scrolling="auto" />
< noframes>
< body>
< p> your browser not support framesets< /p>
< /body>
< /noframes>
< /frameset>



3. add a webpage in ur application which will contain data of header
add following code in it (menu of header) to open pages in content area of page u added in step1
protected void Button1_Click(object sender, EventArgs e)
{
string url = "studentdetails.aspx";
string framescript = "";
Page.ClientScript.RegisterStartupScript(this.GetType(),"FrameScript",framescript);

}

4. add a webpage in ur application which will contain data of footer

Share This!


No comments:

Powered By Blogger · Designed By Seo Blogger Templates