aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Redirect to Another Page in Handler in using C#, VB.NET

Jul 12, 2013

Here I will explain how to redirect to another page in handler (.ashx) file in


In previous articles I explained jQuery get set text to label, Get set control values in jQuery, jQuery Set Get textbox control value, jQuery get dropdown selected value & text, JavaScript create watermark text for textbox and many code snippets articles relating to JQuery, JavaScript, Now I will explain how to redirect to another page in handler (.ashx) file in

Redirect user to Another web page in handler(.ashx)

To redirect to another web page in handler we need to write the code like as shown below

HttpContext.Current.Response.Redirect("Default.aspx", false);
In this way we can redirect user to another web page in handler(.ashx) file

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Abey E Mathews said...

how to create a page for testimonials
similar page like below..

Irtekaz Ahmed Khan said...


Mossad@1962 said...

hi .......
please elaborate handler

Anonymous said...


Unknown said...

Please description about ASHX with examples

dhruv said...

for (int i = 0; i < rpt.Items.Count; i++)

DropDownList drpstarttimehours = rpt.Items[i].FindControl("drpstrthh") as DropDownList;
DropDownList drpstarttimeminu = rpt.Items[i].FindControl("drpstrtmm") as DropDownList;
DropDownList drpstarttimett = rpt.Items[i].FindControl("drpstrttt") as DropDownList;
DropDownList drpendtimehh = rpt.Items[i].FindControl("drpendhh") as DropDownList;
DropDownList drpendtimemm = rpt.Items[i].FindControl("drpendmm") as DropDownList;
DropDownList drpendtimett = rpt.Items[i].FindControl("drpendtt") as DropDownList;
CheckBox chkisclose = rpt.Items[i].FindControl("cbisclose") as CheckBox;

Label lblstarttime = rptfromcurrentdetails.Items[i].FindControl("lbllivesundstart") as Label;
Label lblendtime = rptfromcurrentdetails.Items[i].FindControl("lbllivesundend") as Label;
Label lblclose = rptfromcurrentdetails.Items[i].FindControl("lblclose") as Label;

string[] time = lblstarttime.Text.Split(' ');
string[] timedtl = time[0].Split(':');

drpstarttimehours.SelectedValue = timedtl[0];
drpstarttimeminu.SelectedValue = timedtl[1];
drpstarttimett.SelectedValue = time[1];

string [] time1 = lblendtime.Text.Split(' ');
string[] time2 = time1[0].Split(':');

drpendtimehh.SelectedValue = time2[0];
drpendtimemm.SelectedValue = time2[1];
drpendtimett.SelectedValue = time1[1];

//if (lblclose.Text == "True")
// chkisclose.Checked = true;
// chkisclose.Checked = false;

angel said...

DataTable dt = new DataTable();


DataRow dr;

foreach (RepeaterItem item in rpt.Items)
dr = dt.NewRow();
Label lbldays = (Label)item.FindControl("lbldays");
DropDownList drpstarttimehours = (DropDownList)item.FindControl("drpstrthh");
DropDownList drpstarttimeminu = (DropDownList)item.FindControl("drpstrtmm");
DropDownList drpstarttimett = (DropDownList)item.FindControl("drpstrttt");
DropDownList drpendtimehh = (DropDownList)item.FindControl("drpendhh");
DropDownList drpendtimemm = (DropDownList)item.FindControl("drpendmm");
DropDownList drpendtimett = (DropDownList)item.FindControl("drpendtt");
CheckBox chkisclose = (CheckBox)item.FindControl("cbisclose");

dr["Operators_OpeningHours_Day"] = lbldays.Text;
dr["Operators_OpeningHours_StartTime"] = drpstarttimehours.SelectedValue + ":" + drpstarttimeminu.SelectedValue + " " + drpstarttimett.SelectedValue;
dr["Operators_OpeningHours_EndTime"] = drpendtimehh.SelectedValue + ":" + drpendtimemm.SelectedValue + ":" + drpendtimett.SelectedValue;
dr["Operators_OpeningHours_IsClose"] = Convert.ToBoolean(chkisclose.Checked);


rptentereddata.DataSource = dt;

Anonymous said...

Plz...Give me MVC Example For

Anonymous said...


Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.