Have a look at http://aspnet.4guysfromrolla.com/articles/020205-1.aspx it gives you a nice url/parameter manager. You could specify in the inital url which page you want to go in after login. for example: localhost:1885/DevelopmentWebsite/login.aspx?redirect=info when you authenticate the user you can check the redirect param and make your redirection based on that value.
boy pockets
Posts
-
Formation of url(using query strings) -
login and logout timeI have looked at storring the logout time to keep a history, but I do not believe it is possible without javascript.
-
complex appSettings entriesHere is the answer i was looking for: mysteries of configuration anyone making a medium-large scale web site should know about this :)
-
code to perform cascading of dropdownlists without postback using c# in asp.net [modified]if you can't use javascript and you don't want to use postbacks then I don't think it is possible...
-
complex appSettings entriesThanks for taking the time to answer again. I hear what you are saying about xml files and will look into it (i know you can specify an 'external' file to extend the appSettings section). my experience is at odds with what you are saying about changing Web.config appSettings entries at runtime and loosing session information. Because I believe I am already doing it (I might be mistaken). Perhaps you could point me to some articles/doco backing up your point of view?
-
complex appSettings entriesI understand the Web.config But if I change a variable in the appSettings section on the server, then it will update live and users sessions are not lost - they get the new value and their session is maintained. But my question is about storing 'complex' types.
-
complex appSettings entriesIn the
appSettings
section of theWeb.config
I want to store 'complex' types such as Collections. Currently to achieve this I am using class libries with aSettings.settings
file which allows this (with a nice interface). But I want to move the data to theWeb.config
file as this will allow me to change the values at runtime (essential). Does anyone have any ideas on how I can do this? At present, I am simply delimiting the entries with a special character. I fear this may be the best solution... cheers. -
custom error modemaybe recreating the error and looking at the
Page_Error
method where you can handle the error manually. as an aside: forcustomErrors
setmode = "RemoteOnly"
that will mean that externals will not see the error, but you will be able to see the error from the local box. -
Storing Setting files so they can be edited during runtime.Hi, Thanks for your reply. Do you mean the Web.config file in the website? That is what i will resort to if I can't get my way, but I was hoping to still be able to use Settings.settings or something similar in the Class Library (not something in the website).
-
Storing Setting files so they can be edited during runtime.I have a web app that has a number of class library projects (which have the business logic). Currently, these class libraries each have a Settings.settings file to contain application settings (like feedback messages and format strings). During runtime i want to be able to go onto the server and change the value of one of the settings. Essentially I want what is currently available for the web project - it has a Web.config file which has all the application settings. I am able to change these settings during runtime.
-
Firefox2 compatibility - centering a tableAs it turns out, I did not need the align="center". This is what I used:
....
I got this answer from http://forums.asp.net/t/1280636.aspx
-
Firefox2 compatibility - centering a tableHi all, I am having browser compatiabiltiy problems. I want to center a table (or a Login Control). It works fine in IE(7), but not in FF(2). Here is an example where is will center align in IE, but left align in FF:
<div style="text-align:center;">
<asp:Login ID="login" runat="server" ... />
</asp:Login>
</div>The same thing will happen if I replace the Login with a Table Control. I have tried adding the property
align="center"
to the div (as suggested on other forums), but this tag is not recognised by VS 2005, so no joy. So how do i get such a control to center in FF? -
ImageButton in a GridViewWhen calling a method such as this:
(ImageButton)Gridview.FindControl("EditButton");
you need to tell it which row to get the control from. So it should look like this:(ImageButton)Gridview.Rows[0].FindControl("EditButton");
The number (0) is the index of the row. Alternatively you can get it in the ImageButtons onClick method. In this case, the sender parameter (comes in as an object) is the ImageButton. -
Problems Validating with a DetailsViewI am trying to Validate fields in a details view. But when I fire the save method, even if the fields are invalid the validation text/summary will not be displayed. It will only disaply if i cancel the save event in the
pre
update event. But I don't want to do this. Any ideas on using validation with aDetailsView
/GridView
cheers -
Help me to solve thisnot sure what you are trying to ask. But a button has a property called CausesValidation. If this is set to false the postback from the control will not make the page validate.
-
Unable to set focus to a text box contained in a gridview's row cell after post-back and binding.My first thought would be to find the row that it is in Insert mode (
SelectedRow
maybe) and give it focus. My second thought would be to extend the GridView in a Server Control. Override theFocus()
method. In this method, if the GridView is in insert mode (GridView.CurrentMode
), then get the current row (SelectedRow
) and then set the focus to that row. If the GridView is not in insert mode than just pass the call to the base (base.Focus()).
-
Validator in DetailsView UpdateI am using Validators (
IValidator
) to validate the data edited by users in a DetailsView. This is the workflow that I want: 1. User updates data 2. User presses save 3. System Saves data 4. Details View stays in edit mode 5. Validation controls display any broken rules. I can do everything except show the validation messages. The validation message will be displayed if, in theItemUpdating
event of the DeatilsView, i cancel theDetailsViewUpdateEven
by setting the property:DetailsViewUpdateEventArgs.Cancel = true
. This behaviour makes me think that once the DetailsView has been directed to save it does not show the Validation errors. (even if I do aPage.Validate()
after the save has completed). Does anyone have an ideas on how I can display the error messages even if I want to save theDetailsView
? -
Printing a GridView that is longer than one page.The real problem was due to this construction:
<asp:Panel ... > <asp:GridView ...> ... </asp:GridView> </asp:Panel>
The properties that were causing problems were in the Panel:overflow
andscrollbars
. Settting overflow tovisible
and scrollbars tonone
fixed my problems. *happy* -
User Unlock*nods* - that would be my suggestion too.
-
User UnlockI don't really understand your question, but maybe this is the answer you are looking for: Hook into the
OnAuthenticate
Event:protected void login_Authenticate(object sender, AuthenticateEventArgs e)
from this method you can tell if the user was successful in authenticating. ie.e.Authenticated