473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How to dynamically customize .Net form

6
Hello,

I wish to change a .aspx page label value dynamically. For example there is a web application with forms in it used by Marketing department. There are labels with text value say 'MarketingLabel1' and so on.

Now if we need to provide the same application to another department say Sales how do we allow the users to customise label values? For example change MarketingLabel1 to 'SalesLabel1'. The users will not have access to code except for any resource file that can be provided. Another reason is that they cannot compile .net project.

Thanks,
jmash
Feb 5 '08 #1
3 1004
nateraaaa
663 Expert 512MB
So you want the user's to have the ability to change the text of the label? You will need to create something to identify which department is using the application. You could create a checkbox for each department in your application and then check which checkbox is checked then change the text value of your label based on the selection. Another alternative is to create an Admin page and allow the user to enter the text of the label and save that value to a Session variable or database.
This sounds like it may be for a corporate Intranet. If so I am sure that you have a way of identifying which department the logged in user is a member of. If this is the case just identify which department the user belongs to and change the text of the label based on that. The user would not have to do anything your code would automatically assign the correct text based on the logged in user.

Nathan
Feb 5 '08 #2
jmash
6
Hi Nathan,

The solution to get the input from the user using an admin page looks interesting.

I was thinking in terms of resource files (.resx files) that can be modified possibly without having to recompile the application. But the problem is we need to recompile the code each time the .resx file is changed.

Also the requirement is to gather the information (many forms having many labels etc) as offline. This way the application can pick up the values from a file (possibly with an xml which can be edited using an editor) and load the form values during page load event. What I need is pros and cons of each method and which is the easy and effective method to implement.

Thanks,
jmash

So you want the user's to have the ability to change the text of the label? You will need to create something to identify which department is using the application. You could create a checkbox for each department in your application and then check which checkbox is checked then change the text value of your label based on the selection. Another alternative is to create an Admin page and allow the user to enter the text of the label and save that value to a Session variable or database.
This sounds like it may be for a corporate Intranet. If so I am sure that you have a way of identifying which department the logged in user is a member of. If this is the case just identify which department the user belongs to and change the text of the label based on that. The user would not have to do anything your code would automatically assign the correct text based on the logged in user.

Nathan
Feb 5 '08 #3
nateraaaa
663 Expert 512MB
Hi Nathan,

The solution to get the input from the user using an admin page looks interesting.

I was thinking in terms of resource files (.resx files) that can be modified possibly without having to recompile the application. But the problem is we need to recompile the code each time the .resx file is changed.

Also the requirement is to gather the information (many forms having many labels etc) as offline. This way the application can pick up the values from a file (possibly with an xml which can be edited using an editor) and load the form values during page load event. What I need is pros and cons of each method and which is the easy and effective method to implement.

Thanks,
jmash
Working with XML in .NET is very easy plus there are so many examples on the web of using XML in .NET that you should be able to accomplish what you want to do very quickly. You may have problems however if more than one person is editing the XML file at the same time. I think that the last one to edit the file would win and this may have a negative impact on your application. Is there a way for you to identify the logged in user of your application? If this is possible you could create an XML file of possible users and the text that the labels should read for that particular user. Let me know if this makes sense.

Nathan
Feb 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: mscir | last post by:
Date: Thu, 08 Jul 2004 17:02:27 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <10ero4l3kp2qa65@corp.supernews.com> Reply-To: mscir@usa.com User-Agent: Mozilla/5.0...
14
by: deko | last post by:
The below code dials a phone number when the subform datasheet cell containing the number is double clicked. The problem is that the dialer application (c:\windows\dialer.exe) pops up windows on...
2
by: JMCN | last post by:
hi i'm having a problem with the customize a shortcut menu. i read the ms office assistance: customize a shortcut menu/delete a command or add to a shortcut menu and followed the simple...
1
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a...
1
by: JuanCarlos Gomez | last post by:
I am try to customize papersize on VBNET (PrintDialog, PritnDocument), but only have access to defined Paper Size on my Printer (FX-2180), how I can customize papersize and use it. Because all the...
7
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the...
10
by: neena | last post by:
can anyone please tell me how to dynamically create labelboxes,textboxes by clicking a button .i want to customize some of the fields in the web form(adding more fields).Suggest me some ideas of...
5
by: Andrus | last post by:
I have database containing translations. I'm creating VS 2005 WinForms application which should use this database to translate menu items to user language. I replaced lines in myform.designer.cs...
2
by: gnewsgroup | last post by:
I am new to the asp.net Table web control. I am using it to customize my presentation of data. I cannot implement the idea with DataGrid or GridView. Basically, I would like to have something...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.