master page refresh without page not reload

i have 3 files (master page , default.aspx and myjs.js)
default.aspx is created by master page
i create myjs.js when i click button(i connect to db and create js file by filestream)
myjs.js in master page file
but i can't access new js file if i dont refresh master page(master page's read old js file)

how can i do ? 

i did that's;


FileStream Dsym = new FileStream(TamY, FileMode.OpenOrCreate, FileAccess.Write);

StreamWriter SW = new StreamWriter(Dsym, System.Text.Encoding.Default);

SW.WriteLine("var image_set = [");

string Satir = "{'caption': '" + AlbmAdi.Text.Trim() + "', 'url': '" + Path + "'}";

if (i != (Toplam - 1))

Satir += ",";








ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "location.href='?Ref=Image';", true);



if (!IsPostBack)


Gelen = Request.QueryString["Ref"];

if (Gelen != null && Gelen.ToString() == "Image")

ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "GB_showImageSet(image_set, 1);", true);


3/28/2009 11:59:06 PM 13714 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 19

That scripts already coming down with .axd isn't it?  I do find this easier for JSON  System.Web.Script.Serialization.JavaScriptSerializer


Good Luck

3/29/2009 3:02:18 AM

hi Danny117,

thanx your answer

but sorry i know a little english (maybe i can't understand your answer)

i haven't any .axd file and i have a js file for show my photo album in greybox

myjs.js(i give AlbumId when i click button) ;

this js file created for AlbumId=10


AlbumId=11 js file has 2 lines

AlbumId=12 js file has 4 lines


var image_set = [

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/1.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/2.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/3.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/4.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/5.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/6.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/7.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/8.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/9.jpg'},

{'caption': 'Album Title', 'url': '../Files/UploadImage/Album Title/10.jpg'}




3/30/2009 12:02:47 AM

That scripts already coming down with .axd isn't it?  I do find this easier for JSON  System.Web.Script.Serialization.JavaScriptSerializer


Additionally, [Working with Web Resources in ASP.NET 2.0]
Hong-Gang Chen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
4/2/2009 8:04:02 AM

Similar Artilces:

Refresh a content page without refreshing master page
Hi, I am creating website.In that web site i am using ajax with master page. i have menu button in master page. When i click a menu item ,it will redirect to another page. How can i refresh only content page when i click the menu item( i tried updatepanel placing in master page ,but it is not working). Please ANy body help me, Thanks in advance.Shivakmar Dagam you may get some help at ASP.NET AJAX > The UpdatePanel Control > Using the UpdatePanel Control with Master Pages Thanx, [KaushaL] || BloG || Profile || Microsoft MVP"I would love to change the world, but they won’...

Refresh a content page without refreshing master page #2
I am developing a website using ajax+Masterpage concept .In my master page ,i have menu controls .The problem is when i click a menu control i want refresh only content page,not total page. So many people said you cant do it.But one day i saw a website  i.e How it is possible friends, Please tell me . Thanks in advance.Shivakmar Dagam Putting your content inside an iframe is probably the best way to do that.  Overusing the UpdatePanel for site navigation (as in that example you linked) is generally a mess to work with and ma...

Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Why in the world am I getting this error? The solutions I have seen either don't apply or don't work.  Here is my master page code:<%@ Master Language="C#" AutoEventWireup="false" CodeFile="TechLMSMasters/MainSide.master.cs" Inherits="MainSide" %> <%@ Register TagPrefix="usercontrol" TagName="Search" Src="~/library/uc/Search.ascx" %> <%@ Register TagPrefix="usercontrol" TagName="UserName" Src="~/library/uc/UserNameDisplay.ascx" %><!DOCTYPE html PUBLI...

ERROR Content controls have to be top-level controls in a content page or a nested master page that references a master page.
This all used to work until about 5 minutes ago. Did I change something? For some reason I am now getting this error: Content controls have to be top-level controls in a content page or a nested master page that references a master page. What I have:  I have a masterpage inside of a directory. That directory is a first level directory with its own web.config file....The whole thing is protected by the web.config file above it (in the main public directory). That main public directory has a masterpage as well. I am not currently linking the two masterpages together becuase...

Error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.
when I make a directory on my root, and in that directory I put a masterpage and a web form ... I get always an error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.   Does somebody know what the problem is ? Is it possible you can't set a masterpage in a directory ... ?Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) i've founded ... I had to nest my masterpage ...Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) Hi Joeri Pansaerts, I am receiving the same error as the one posted her...

Navigation between pages without refreshing entire page.
Hi    How can i do page navigation without out getting any refresh on web page, Like Nikhil Kothari's Weblog .   is there any  atlas control to do that ? or How is it possible to enable this ? Regards, Gopinath,   That's not AJAX.  It's just a fancy way of transitioning a page.  You can google for "web page transition" or check out the following page for some samples:

Change content pages of Master Page without Master Page posting back?
so Master + content pages seems like exactly what I want except that they are assembled on postbacks. I am trying to make a site where both Master and Content pages have updatepanels, and the site switches content pages (40+ content pages) without the master page refreshing. Master Pages are assembled on postbacks so I don't think simple master page will work without annoying postbacks. I tried an approach where load content pages inside an Iframe, but the content pages take too long to load becuase each content page loads its own scriptmanager. View/Multiview will probably work but dif...

HELP..... Master Page Error (The page has controls that require a Master Page, but none is specified.)
Hi, I had almost finished creting my master page to use as a template for all future internal applications.  I had created a template to use in creatign new applications and had sucessfully created a new project based upon the MasterPage template... All was working well when I noticed a small graphic inconsistancy on the MasterPage... I reopened the MasterPage and I got teh above error message... I have looked at the HTML and everything seems to be okay and there including the header lines... <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits=&qu...

Problem Accessing Page Controls in a page that has a master page.
Hi,  I have a problem with accessing the controls of a page that has a masterpage. I am trying to access the Page.Controls from the code behind in the class file but no controls are returned.I can access single controls (ex. txtAddress.Text) but not the whole array of controls (ex. Page.Controls).  The controls structure is..                                 MasterPage  >  PlaceHolder > MyPage.aspx &n...

How to Refresh DataList Control in Master page from Nested page
Hi, I have a DataList control in a MasterPage that lists the contents of a shopping basket. The nested pages add products via a Class in App_Code that updates a DataTable stored in session state. My problem is binding the DataTable back to the DataList after updating. I've tried adding a Sub in the MasterPage and calling the Sub Master.SubName but intellidense doesn't show the Sub. Also Master.FindControl("DL_basket") doesn't work. Any advice would be greatly appreciated. Try adding the following to your child page: <%@ MasterType VirtualPath="~/yourMasterPage.master" %> ...

Replace content page or user control without refreshing page.
I want to do something like this. I have many content pages, they have a common header, menu and each have their own submenu. when I choose one item from the menu. the according content is being shown.   I have been searching for days now, if anyone has any suggestion, please tell me.   The best case is putting the header and menu in a master page and content pages in their own .aspx I am told that this may not be possible, so I am considering other solution. I am trying a master page with header and an empty content page. putting contents in different user control (.ascx)...

Paging Paging Paging
I am trying to do paging with my search results and it isnt working very well. Here is what I've tried and I feel I've tried everything, lol, please help me out. Sub DataGrid1_SortCommand(Sender as object, e as DataGridSortCOmmandEventArgs) DataGrid1.DataBind() End Sub Sub Datagrid1_PageIndexChanged(Sender as object, e as DataGridPageChangedEventArgs) Dim ds as dataSet DataGrid1.CurrentPageIndex = e.NewPageIndex if Session("Search") is nothing then 'Session probably has expired, get the datasource from database Datagrid1.DataSource = ...

Master Page Loads without Content page server controls data
My question is I have a Master Page, Content Page, and Code Behind File. I have some asp tags for Server Controls between the Content ID in the Content  Page. However, the code in my code behind is obviously not being ran because when I run the Content page my controls are empty. Could someone please tell me what is going on?   Thanks In Advance, Ronald hi, try using reinstalling the framework and register the aspnet in iis by aspnet_regiis -i, otherwise post the samplePlease Mark as Answer if it helps you...

SOLUTION: Menu Control inside Master Page without page postback
I know there have been some old inquires regarding removal of the full page postback when an Item is clicked inside a menu control. Most solutions require iframes, etc. Well, I had designed my entire site already using menu control and a master page, so I wanted to implement some simple functionality that I could simply plug in. Page transition effects are the answer. Its more of a illusion, than any special implementation. <meta http-equiv="Page-Enter" content="progid:DXImageTransform.Microsoft.Fade(duration=0.1)" /> <meta http-equiv="Page-Exit" con...

Web resources about - master page refresh without page not reload -

Memory refresh - Wikipedia, the free encyclopedia
As time passes, the charges in the memory cells leak away, so without being refreshed the stored data would eventually be lost. To prevent this, ...

Facebook Allowing Page Admins To ‘Refresh Share Attachment?’
Facebook appears to have given page administrators the option of refreshing links that they share in posts on their pages . continued... New ...

The article requested cannot be found! Please refresh your browser or go back. (CP,20120705,,-1,AR). delivers the latest breaking news and information on the latest top stories, weather, business, entertainment, politics, and ...

Refresh Analytics Provides Developers with Demographics
Toronto-based Refresh Partners has been providing demographic analytics tools for its clients to analyze their Facebook apps’ users for months. ... gets a refresh
Every month, hundreds of millions of people come to Twitter to see what’s happening in the world. After all, it’s often the best place to turn ...

Refresh - Insight on People You Meet on the App Store on iTunes
Get Refresh - Insight on People You Meet on the App Store. See screenshots and ratings, and read customer reviews.

Maine's First Ship Pepsi Refresh Video.m4v - YouTube
Maine's First Ship Pepsi Refresh Video.

IN PICTURES: Fujitsu's 2012 notebook refresh - Slideshow - ARN
New addition consists of a new Ultrabook in the Lifebook U series

Refresh your tiles to refresh your bathroom
Refresh your tiles to refresh your bathroom

Aldi supermarket refresh: Will fancier stores make Aldi more expensive?
ALDI has finally decided to invest a bit of money and refresh its supermarkets. Someone at the famously frugal German retailer has decided looking ...

Resources last updated: 12/3/2015 8:16:03 AM