I am trying to customize the create user Wizard control in asp. What it does is redirecting me to a continue page after creating the user, but I want a custom page to be displayed after creating a page.... What can I do?
Handle CreatedUser event and then Response.Redirect()
or play with control's properties:
ContinueDestinationPageUrl Gets or sets the URL of the page that the user will see after clicking the Continue button on the success page.
FinishDestinationPageUrl Gets or sets the URL that the user is redirected to when they click the Finish button.
Related
i am using c# aspx , what i'm trying to do is to change a button.visible value from another page.
my page is build from 1 main page and 2 iframes ,the main page uses as a menu, iframe 1 is a login page and iframe 2 is the pages of my site.
on the menu page i have an admin control button which allows me to edit my database , this button visibility is false by default, then , if an administrator is logged in at the login iframe, the button should get visible.
i have tried in so many way to change that button but none worked ,
what i have tried so far:
1) send the button in a session ,recive on other page and change -not working
2) send the whole page and change - not working .
3) make the button public static and change - not working .
i have noticed that even when i change the text on the button on the other page ,on the menu page (the page where the button lays) the button didn't changed it's text.
anothere thing i have noticed is when i press a button on a page , the page is sort of updating (like refreshing but keeps values) , is there a way to make this kind of update manualy?
thanks .
I am assuming from your description that you are trying to change the visibility of the button on the other frame from a post back within the log in frame. The short answer is that this will not work because there is nothing being sent from the server to the client for the other frame.
Your would need to set the visibility of the button in a post back of the page containing the button (which is in the other frame).
It may be better to remove the use of frames and use a master page to provide the log in portion of your page/site as this would allow you to change the visibility of the button in a post back for any page on your site.
For the attempts that you have tried, all three of these should be avoided because the controls are recreated every post back when the page is recreated and will also be disposed every post back in the unload of the page. Since the control and page would be disposed on the first request if you access it on a subsequent call to the server there is no guarantee that the state of the page or control is valid.
For more details on the life cycle of a page, look at the ASP.NET Page Life Cycle Overview:
http://msdn.microsoft.com/en-us/library/ms178472.aspx
I have an asp.net page_load event.
When the user clicks the back button of the browser I want to set some values in the page_load event.
The problem is that when I click on the back botton the page is rendered from Cache and the page load event is not fired.
What should I do so that page_load gets fired ...other than forcing the browsers cache to clear ?
If I understand you correctly you have the following situation:
User visits page A.
User clicks a link and visits page B.
User clicks the back button and page A is displayed again. It is displayed from the browser cache, instead of being refetched from the server.
Is that right? In that case you should mark the page as no-cache. With the Response.CacheControl property you can decide what caching options are returned in the http header of the response.
I came up with a solution.
Indeed the back button has nothing to do with the server events...the page is directly renedered from the browser cache.
So what I did was that I ran a script on the page load but not ASP's page load ,rather the javascript page load.
Whenever the back button is clicked the JS page load would be raised.
I have a third party form that I can't control. I'm putting that form on my webpage via an iFrame. I am then trying to redirect that iFrame to a new page after the form has been submitted.
Example:
User visits my webpage. They enter their email in the web-form. They then hit submit. The iFrame is redirected to a page that displays "Thanks for confirming your email!" etc..
Essentially after they enter their email I want that iFrame to redirect to a different page. I don't know how to do it because I don't control the form. I was thinking maybe adding a button or function when they hit enter or click submit that it submits the form then after a set amount of time it r
This is considered cross site scripting http://en.wikipedia.org/wiki/Cross-site_scripting so I'm not sure if it will work. Maybe you could open the subscribe form in a modal(like this http://colorpowered.com/colorbox/) and then the user will close the modal when he wants.
I want to connect one webpage to another using a command button called email. When the user clicks on the email button it should take them to another webpage where the user can select the emails they want to send to. Then they will click the OK button and it will return them to the previous webpage where they can type in their email and write a message and hit submit.
To do this, you can use the asp.net Session object. Session allows you to save information, such as a list of email addresses into memory, and retrieve them on another page.
Here's the basic article on Session, including a bunch of how-to's.
From a logic flow perspective:
Main form page loads
User completes one or more fields
User clicks "Select Emails" button
In the button click event handler, store all completed form values in Session, and redirect to second .aspx page
User selects some email addresses and clicks Okay
In code behind of email .aspx page, in your okay button click event handler, store which email addresses were selected in Session, then redirect back to the Main form.
During page load on the Main form, check for page is not postback, and if the session values exist, use them to populate the form.
During form submission (where an email should be created), use the email list previously set it Session, to populate the 'to' list.
On one of my ASP.NET pages I have several asp:textbox fields. On this page there is a "confirm order" button with an external url set in its "PostBackUrl" property.
This works well, and the data is sent to the external site. Here comes the question; how do I know that the user clicked the "confirm order" button on "my side?" (I need this to update my order-status field). There is off course no postback happening on my page becasue the form is submitted to the external site.
Maybe it's possible to use some sort of jQuery to hook on the onclick-event that will call a page that will update my order-status?
You'll need to hook into the buttons onClick event, perform a client-side callback to either a web service or Page Method (depending on your preferred setup) on your server to track the click, before allowing the form submission to continue.
Better to set it up so that the button does perform a postback. Then in your click handler you can update your order-status, and then post the data to the third party.