.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
satyapriyanayak
SP
Kaviya Balasubramanian
abhays
Sasi Prabhu
Post New Web Links

have problem to redirect page , on cancel button click

Posted By:      Posted Date: October 09, 2010    Points: 0   Category :ASP.Net
 

hi,

i am doing simple login page and i used to required field validator to validate user name and password text box.

and there are two buttons submit and cancel.

now i want to redirect this page to home.aspx after clicking on cancel button, but that two required fields validator get pop up and i get stuck in login page.

 if anyone knows how to solve this problem please tell me..

thanks, in advance for your valuable time. 




View Complete Post


More Related Resource Links

Reporting services in 2008 r2 how to get a report in a print button click event in my c#.net page

  

how to  get a report in my c#.net page button lick event also steps to call a report from asp.net to reporting services

 

Thanks in advance


Button click in master page use in other pages I have to click twice. Why?

  

In my masterpage I have a menu with buttons. I want the buttons to do something after click. It works but I have to click twice on the button, why? What do I have to do to just to click once?



Catch button click event in different .aspx page.

  

I have a button which starts processing.
I want that when ever a button is click from page1.aspx .. a count down timer should start and displayed on page2.aspx.
I am thinking of using iframe to join 2 pages.

Please let me know your suggestions.

Thanks


How to manage postback on crystal Report viewer next page click button clickj

  
 Hi,       I am using Crystal Report on my ASP.NET Fw. 3.5 project. My report contains 100+ pages. When I click on next page button on crystal report viewer control my whole page gets postback to server and then second page appears. This take same time when first time report gets loaded.     Any suggestion how to imporve user experience in thiss case?   Nilkanth Desai   

what should i add, or change to maintain the addition on the page at button click, yes i know why, b

  
 - select day using the drop down list  - select the start date using calender (causes an event), a table is made having the dates of the day selected from the start date and shown to the user.  - the table also contains checkbox for each row in a cell  - the user selects the check boxes he wants  - and clicks the button  - the button calls the method in the .cs file which SHOULD TRAVERSE THE TABLE ROWS TO FIND THE ticked checked boxes and the rest is self explanatory the problem ----------- on calender selection change event nothing is lost, but on button click event all things in table created by code is lost. (as the debugger shows that the row count is zero). i understand that in the page cycle the rows etc added the form by the date change event of the calender are not preserved. fine. but whats the solution. please help i have been searching for a solution desperately. the source --------      <asp:Calendar ID="Calendar1" runat="server"          >         <SelectedDayStyle BorderStyle="Dotted" BorderWidth="4px" />         <TodayDayStyle BorderStyle="Solid" BorderWidth="4px" HorizontalAlign="Center"              

logout problem(after logout when clicking on back button after logout still opens the previous page

  
I am using ASP.NET, the web page is abandoning and clear session when a user click logout link but they click the back button and it is still showing the previous page. How can it prevent the previous page after logout?on Logout.aspx load im using this code//=================//        Session.Clear();        Response.Buffer = true;        Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D);        Response.Expires = -1500;        Response.CacheControl = "no-cache";        //----- Second Technique : To Stop Caching of Secure Pages.        Response.Cache.SetCacheability(HttpCacheability.NoCache);        FormsAuthentication.SignOut();        if (Session["UserName"] == null)        {            Response.Redirect("login.aspx");        }       Session.Clear();         Response.Buffer = true;         Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D);         Response.Expires = -1500;         Response.CacheControl = "no-cac

Multiple instance of User Control on Page - Button Click Event

  
Hi, I have this Web User Control, with 3 controls:<asp:TextBox ID="txtSearch" runat="server" /> <asp:RequiredFieldValidator ID="rfvSearch" runat="server" ControlToValidate="txtSearch" Display="None" /> <asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click" /> In code behind: protected override void Render(HtmlTextWriter writer) { rfvSearch.ValidationGroup = this.ID + "_validation"; txtSearch.ValidationGroup = this.ID + "_validation"; btnSearch.ValidationGroup = this.ID + "_validation"; base.Render(writer); } protected void btnSearch_Click(object sender, EventArgs e) { Response.Redirect("ResultadoSearch.aspx?argumento=" + txtSearch.Text); } When I try to add two UserControl and I Click in btnSearch of second UserControl, txtSearch.txt returns value of first User control.How I can get the value of second txtSearch?

asp.net mvc multi button on same page problem

  
On my employee edit view page i have 3 buttons Save,Cancel,Delete.Save - saving view page values. calling controller action.Cancel - Go back to previous view page. (List of employee page. where this page view comes)Delete - Delete current page employee and go back to List of employee page. where this page view comes.Save button click by default working for me calling controller.but when i click cancel and delete button same controller gets callHow to handle this situation on page view.

How to redirect Infopath form programmatically on button click

  

I am having an issue with infoPath Forms and C#, 
I have a 1st form open to the user, and when he click a button it opens a 2nd form.

Sounds pretty easy, but I have tried many ways and still error.
(environment is InfoPath Forms 2007 in Sharepoint and code: C#)

this is what I have:
- form1 . a text field where I enter the URL of form2
            . a button with code below

The issue is that if I type the URL of form2 
(http://sharepointserver/sites/MySiteCol/Myinfopath/_layouts/FormServer.aspx?XsnLocation=http://sharepointserver/sites/MySiteCol/FormServerTemplates/form2.xsn&SaveLocation=http://sharepointserver/sites/Myinfopath/InfoPathLib)
 in the text field and press the button I get this error
"Critical Error : An error occurred submitting this form to the Web server. The form will now be closed."

But instead of the URL of form2.xsn I type http://www.google.com/ they it works (w

share point page getrting refreshed while click on button

  

hi

i am using one combobox and one datetime picker in web user control..

i fill combobox at page_load time in if(!ispostback) method

while i select value in combobox and then click on button page is getting refreshed.

in button_click event i just write

label.text=COMBOBX.SelectedValue.tostring();

 


GridView and mouse double click Response.Redirect problem

  

VS 2005, AJAX 

I use gridview and I need single and double click for each row in gridview.

When I click once on a row, some action will execute (e.g. next button should be enabled) and when I double click the row there should be redirection to another page.

I used the code below for both single and double click  usage:

 

protected void GwContainers_RowDataBound(object sender, GridViewRowEventArgs e)
        {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    // Get the LinkButton control in the first cell

                    LinkButton singleClickButton = (LinkButton)e.Row.Cells[8].Controls[0];
                    // Get the javascript which is assigned to this LinkButton

                 

how to open window in new page on button click

  

hi all,

Here's my code

        If rdvalue = "Dept" And ddldeptr.SelectedValue <> "" Then
            Button1.PostBackUrl = "~\Reports\Hrmis\CrvGpDept.aspx?fromd=" & txtfrom.Text & " &tod=" & txtto.Text & "&dep=" & ddldeptr.SelectedValue & ""
        ElseIf rdvalue = "Sect" And ddlsectr.SelectedValue <> "" Then
            Button1.PostBackUrl = "~\Reports\Hrmis\CvGpSect.aspx?fromd=" & txtfrom.Text & " &tod=" & txtto.Text & "&sec=" & ddlsectr.SelectedValue & ""
        ElseIf rdvalue = "Desig" And ddldesigr.SelectedValue <> "" Then
            Button1.PostBackUrl = "~\Reports\Hrmis\CrvGpdesig.aspx?fromd=" & txtfrom.Text & " &tod=" & txtto.Text & "&desi=" & designation & ""
        ElseIf rdvalue = "Emp" And txtempidr.Text <> "" Then
            Button1.PostBackUrl = "~\Reports\Hrmis\CrvGpemp.aspx?fromd=" & txtfrom.Text & " &tod=" & txtto.Text & "&emp=" & empid & ""
        Else
            Button1.PostBackUrl = "~\Reports\Hrmis\CrvGpall.aspx

how to call button click event of ascx page in the button click event of aspx page

  

hi,

i'm using user control in my page.i need to call the button click event of user control in the button click event of aspx page based on some condition.is it possible?can any one help me?


Access PreviousPage on the button click handler of target page

  

Hi, I Have two pages source.aspx and target.aspx. Source.aspx has one button and other form controls the collect input. The button has its postbackurl property set to target.aspx.

On target.aspx I have another button and other form controls that collect input. When the user clicks on the target.aspx button, I want the inputs from both source and target gathered to be inserted into the database. The problem is the Page.PreviousPage property is only available during the initial rendering of the target.aspx page. So when I click on target.aspx button, PreviousPage is now null. 

One strategy of mine is to collect the information on page_load and store it in ViewState, but is there any other method that I should consider in this process. I think the cleanest approach would be to somehow access PreviousPage on the button_click event handler, but how can I access this property.

Thanks


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend