Redirect and refresh a page using the Meta tag
Posted on 2/25/2008 10:30:08 AM
in #ASP.NET 2.X
Hi/P>
/o:p>/P>
Many a times we have a requirement where by we want to make a pager refresh by itself at a certain interval. We may also want to redirect the page to another page after a certain amount of time. I know we can do this with the help of Asp.Net Ajax Extension’s Timer control. But that can only be used when you are using Ajax/st1:place>/st1:City> in your page and more importantly should be used when you have requirement to update some small section of the page. For this requirement we can simply use a Meta/st1:place> tag in the Page header./P>
/o:p>/P>
To refresh the page after a certain period of time, we can use the meat tag refresh. Here is how to use the tag (The tag should be added in the Head section of the page).
/P>
<meta http-equiv="refresh" content="300">/P>
/o:p>/P>
The content attribute defines the time in second after which the page should refresh. So in the example the page would refresh after every 5 minutes.
To redirect the page to another page after certain time we can modify Meta/st1:place> tag like this.
/P>
<meta http-equiv="refresh" content="2;url=http:////www.VikramLakhotia.com"> /P>
/o:p>/P>
Here the page will be redirected to given URL after the time mentioned (2 seconds here) in the content (attribute) before URL here./P>
/o:p>/P>
Vikram/P>
|
Posted on 5/20/2008 9:26:56 PM
Hi Vikram,
/p>
Can u please tell me how to do "deleting data in xml table using class and objectdatasource". I can able to retrieve,insert and update data but cant delete...I wrote the code as follows in class file for deleting:
/p>
public void deleting(Int32 rno)
{
int j = give_index(rno);
if (j != -1)
{
ds.Tables[0].Rows[j].Delete();
ds.WriteXml(xml_path);
}
/p>
}
/p>
In the above code, it is taking "rno" as 0 for every row( it is suppose to take the "rno" cell's value but it is not taking, for updating it is taking the correct value)..
/p>
Any help please..
/p>
|