Introduction:
Here I will explain how to redirect to another page in handler (.ashx) file in asp.net.
Description:
In previous articles I explained jQuery get set text to label, Get set asp.net 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, asp.net.
Now I will explain how to redirect to another page in handler (.ashx) file in asp.net.
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 Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
9 comments :
how to create a asp.net page for testimonials
similar page like below..
http://beta.partysuppliesnow.com.au/customer-reviews.php
http://www.siteart.co.uk/pretty-css-testimonials
yes,thanks
hi .......
please elaborate handler
good
Please description about ASHX with examples
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;
//}
//else
//{
// chkisclose.Checked = false;
//}
}nice
DataTable dt = new DataTable();
dt.Columns.Add("Operators_OpeningHours_Day");
dt.Columns.Add("Operators_OpeningHours_StartTime");
dt.Columns.Add("Operators_OpeningHours_EndTime");
dt.Columns.Add("Operators_OpeningHours_IsClose");
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);
dt.Rows.Add(dr);
}
rptentereddata.DataSource = dt;
rptentereddata.DataBind();
Hello..sir..
Plz...Give me MVC Example For ASp.net
good
Note: Only a member of this blog may post a comment.