|
Visit
http://www.hit-counter-download.com/
For details
|
|
|
|
|
Hi,
I want to make my website configurable so I want to include some settings somewhere (maybe in web.Config file), when I was reading about this topic I found that Windows Form Apps can have "Application Settings" file in which you can visually create and remove user scope and application scope settings, which seems to be an easier way to make a project configurable, but I noticed that I can't store whatever objects I want, for example I can't store List<mycustomclass> object, and I don't know if this type of settings is applicable to web applications.
In short, I want to know the best way to make a Web Project Configurable in terms of:
1. It is easy (and not time consuming) to add/remove settings.
2. It can store custom objects for example: MyCustomClass.
Any Ideas?
Thanks alot
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|
|
Mohammad A Gdeisat wrote: It is easy (and not time consuming) to add/remove settings.
Put it in custom configuration files. Write classes for reading and writing to these files. For primitive values, you should be able to open this config file manually and edit the required settings.
Mohammad A Gdeisat wrote: It can store custom objects for example: MyCustomClass.
This also can be kept on XML files. You need to serialize the custom type's object and encode to Base64 . Problem with this approach is you need to create some user interface to manage this and can't be edited by opening the file directly.
Mohammad A Gdeisat wrote: I can't store List object, and I don't know if this type of settings is applicable to web applications.
As I said, it can be serialized and stored. But I will not suggest keeping custom types in configuration files as serialized. Because you can't manage it easily. Recommended approach is to keep values which can be used to create the custom type. Read this values and create your type and if it is used frequently and not user specific, cache it.
To explain my point, assume you have to keep details of people who are administrators of the site. You can keep your configuration entries like
<administrators>
<administrator>
<name>name1</name>
<role>somerole</role>
</administrator>
<administrator>
<name>name2</name>
<role>somerole</role>
</administrator>
</administrators> You need to create a type for administrator with necessary properties. Read these details from this configuration and fill your custom types. Cache it in static variables or ASP.NET cache object for future use.
XML serialization also works well.
Hope this helps
|
|
|
|
|
Yes, this definitely gives a better view
Thanks for your time
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|
|
If you want to use global setting for website then Opt for Application Variables.
|
|
|
|
|
hi...
i'm doing my engineering final year ... i need to do a project in my final semester... can someone help me out with some good topics... would be grateful for your help....
|
|
|
|
|
...
Blog link to be reinstated at a later date.
|
|
|
|
|
i'm soory for having done that...
|
|
|
|
|
Why don't you look into Google
Cheers!!
Brij
|
|
|
|
|
i searched.... but aint able to grasp much...
|
|
|
|
|
Why is it that so many people think the best way to find a topic, is to ask a forum ? how do we know what you're capable of ? I assume whatever we suggst, in a week you'll ask us to write it for you.
Think about what your skillset is, think of the coolest thing you think you can achieve, and do it. A reasonable idea, well executed, will surely get more marks than a great idea, poorly executed.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
indeed true boss... but i'm weak in coding... but good in designing... any suggestions???
|
|
|
|
|
I have made an App_Themes and put on it 2 folders ... My question is how can I use these themes in my web in order to apply the selected themes by the user to the all pages
when the user select the theme such as blue how can I apply this theme "blue" in all pages
thaanks
|
|
|
|
|
Have a look[^]
You can set it , in your master pages. If you want to change runtime you need to use HttpHandler. Search Google for that
cheers,
Abhijit
|
|
|
|
|
How do we reset the sessionid,when we click on file --> new window or CNTRL + N
existing sessionid is being used.
Is it possible to issue a new sessionid to the browser in that case ?
i tried resetting the sessionid cookie but nothing happened
Session.Abandon();
Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", ""));
Even after resetting consecutive postbacks still have the other windows sessionid.
|
|
|
|
|
This is getting asked constantly. I don't believe there is a solution.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Member 2437558 wrote: How do we reset the sessionid,when we click on file --> new window or CNTRL + N
The window is opened in the same session, so it should have the same session id.
If you have any data that is page specific, you should not store it in session state, you should make it follow the page.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hello sir,
i took a link button for logout. but it is not working. i used session.remove("userid") and session.removeAll(). it is being loged out but whenever i go to back page after loged out then previous page is comming. though page_load is not working whenever page comes.
plz give me some solution for that.
thank you .....
happy new year.
yogesh
|
|
|
|
|
The page is being cached by IE, so you need to set the page caching off.
http://aspalliance.com/668[^]
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
yogesh_softworld123 wrote: session.remove("userid") and session.removeAll().
Use Session.Abandon to clear the session.
yogesh_softworld123 wrote: page after loged out then previous page is comming. though page_load is not working whenever page comes.
There is a search box on the top of this page. Use that to search this forum and this question is getting asked daily.
|
|
|
|
|
yogesh_softworld123 wrote: i used session.remove("userid") and session.removeAll(). it
If you are using the Session mode as InProc then, procedure will be as:
1. Open global.asax file and searh for "void Session_End(object sender, EventArgs e)"
In this function initialize your sesion variables to default value or NULL value as desired.
2. Use Session.Abandon() to clear the Session, this will call Session_End function of Global.asax.
In case you are using stateserver as session mode,
the above code will not help you.
You need to clear the variables manually in login page load event.
|
|
|
|
|
Amandeep Singh Bhullar wrote: Open global.asax file and searh for "void Session_End(object sender, EventArgs e)"
In this function initialize your sesion variables to default value or NULL value as desired.
Not required. Session.Abandon will clear all session.
|
|
|
|
|
I have faced the problem, that't why i am telling that code in global.asax is required. Otherwise it will not work.
|
|
|
|
|
Hi
I have one gridview control.I have taken one button as Item tamplete,command name is "Delete".
I have created one function:
protected void gvUser_DeleteCommand(object sender,GridViewCommandEventHandler e)
{
Response.Write("hi");
}
where I call this function?I was trying to call on "OnRowDeleted","OnRowCOmmand"
but generates an error "No overload for 'gvUser_DeleteCommand' matches delegate 'System.Web.UI.WebControls.CommandEventHandler'"
Pls if u have any solution,as early as possible reply me.
Thanks
monika
|
|
|
|
|
Ah - you need to read the docs.
monika_vasvani wrote: GridViewCommandEventHandler e)
This will be an eventargs, probably an overload, but it sure isn't the eventhandler that is passed in to the method. That's what the error was telling you.
I'd guess at GridRowCommandEventArgs e, but check MSDN.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|