Click here to Skip to main content
15,920,956 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to play video in asp.net 2.0 page Pin
N a v a n e e t h1-Jan-09 19:56
N a v a n e e t h1-Jan-09 19:56 
QuestionVisitor's count Pin
reogeo20081-Jan-09 15:34
reogeo20081-Jan-09 15:34 
AnswerRe: Visitor's count Pin
N a v a n e e t h1-Jan-09 15:50
N a v a n e e t h1-Jan-09 15:50 
GeneralRe: Visitor's count Pin
reogeo20081-Jan-09 16:42
reogeo20081-Jan-09 16:42 
GeneralRe: Visitor's count Pin
N a v a n e e t h1-Jan-09 16:47
N a v a n e e t h1-Jan-09 16:47 
AnswerRe: Visitor's count Pin
Aman Bhullar1-Jan-09 18:19
Aman Bhullar1-Jan-09 18:19 
QuestionApplication Settings in Web projects Pin
Mohammad A Gdeisat1-Jan-09 10:41
Mohammad A Gdeisat1-Jan-09 10:41 
AnswerRe: Application Settings in Web projects Pin
N a v a n e e t h1-Jan-09 16:20
N a v a n e e t h1-Jan-09 16:20 
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 Smile | :)


GeneralRe: Application Settings in Web projects Pin
Mohammad A Gdeisat2-Jan-09 2:29
Mohammad A Gdeisat2-Jan-09 2:29 
AnswerRe: Application Settings in Web projects Pin
Aman Bhullar1-Jan-09 18:21
Aman Bhullar1-Jan-09 18:21 
Questionhelp!!!! Pin
saadahmedsait1-Jan-09 8:25
saadahmedsait1-Jan-09 8:25 
AnswerStop spamming the forums! Pin
leckey1-Jan-09 12:53
leckey1-Jan-09 12:53 
GeneralRe: Stop spamming the forums! Pin
saadahmedsait1-Jan-09 20:49
saadahmedsait1-Jan-09 20:49 
AnswerRe: help!!!! Pin
Brij1-Jan-09 17:30
mentorBrij1-Jan-09 17:30 
GeneralRe: help!!!! Pin
saadahmedsait2-Jan-09 7:20
saadahmedsait2-Jan-09 7:20 
AnswerRe: help!!!! Pin
Christian Graus1-Jan-09 17:52
protectorChristian Graus1-Jan-09 17:52 
GeneralRe: help!!!! Pin
saadahmedsait2-Jan-09 7:19
saadahmedsait2-Jan-09 7:19 
QuestionApplying Themes in ALL pages Pin
ahlamasp1-Jan-09 5:15
ahlamasp1-Jan-09 5:15 
AnswerRe: Applying Themes in ALL pages Pin
Abhijit Jana1-Jan-09 18:50
professionalAbhijit Jana1-Jan-09 18:50 
Questionhow to reset SessionID Pin
Sundar_R1-Jan-09 3:22
Sundar_R1-Jan-09 3:22 
AnswerRe: how to reset SessionID Pin
Christian Graus1-Jan-09 3:23
protectorChristian Graus1-Jan-09 3:23 
AnswerRe: how to reset SessionID Pin
Guffa1-Jan-09 4:00
Guffa1-Jan-09 4:00 
Questionhow to logout in asp.net 2.0 Pin
yogesh_softworld1231-Jan-09 3:05
yogesh_softworld1231-Jan-09 3:05 
AnswerRe: how to logout in asp.net 2.0 Pin
Christian Graus1-Jan-09 3:07
protectorChristian Graus1-Jan-09 3:07 
AnswerRe: how to logout in asp.net 2.0 Pin
N a v a n e e t h1-Jan-09 3:07
N a v a n e e t h1-Jan-09 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.