|
Hi to all!
I've got some stupid question but i just can't figure it out.
I've working with ASP.NET for some time but i never have to make web application with user roles. So i began to work and place login control, create few users and roles but then i stop because i didn't know how to make some components on page to be enable(or invisible) for one role and disable for other role. I search about the problem and only answer i found is that roles in asp.net is based on folder security. So when logged user is with role manager i redirect him to Managers\Sales.aspx but when logged user is with employee role i redirect him to Employee\Sales.aspx. And this two pages are different - some controls are enabled (or invisible).
So my question is - is this the only way to achieve or i can do it "stupid" way - check logged user role and with some "if" enable (or hide) some controls?
Sorry again i know that this is a stupid question but i have to ask
King Regards!
countNazgul
|
|
|
|
|
Watch these videos[^] for a start if you have not.
I use a combination of approaches. One is my menu system has role tags so various functions are not visible to some users. This is also supplemented with web.config files in subdirectories that control access to the subdirectory. This works where the whole page is restricted to a set of roles.
When you get down to single pages that need to be different for various roles, there are two approaches.
One is that I have code in Form.Load that hides/shows different panels/controls according to which roles a user is in.
The second is that I wrote a RolePanel control that subclasses the panel control, and hides itself if a user isn't in the specified roles. This makes it easier to do the security declaratively rather than writing code.
'Howard
|
|
|
|
|
Hi All,
I am Classic ASP programmer(vb script/java script) and developing a news site and i have to display news contents in hindi & english , In english there no problem to displaying but i am worry about displaying content in hindi.
Kindly suggest me how i can stored/retreive hindi content from database as well as display .. you can refer amarujjala.com.
What are the various method to display bilingual content on classic ASP pages.
Waiitng for your response.
Thankyou
Life is not easy ,let's make it.
|
|
|
|
|
I'm using MySql and PHP.
I'm a Persian.
Whenever I wanna store/retrieve data to Mysql In Persian I've created a table with this syntax in MySQL.
CREATE TABLE `test`.`table1` (
`Field1` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_polish_ci NOT NULL
.
.
.
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_persian_ci
I think you should change your fields languages in SQL.
You should change utf8_persian_ci with Hindi.
|
|
|
|
|
Thx Persian,
Really ur suggetion is quite good but when u echo the table value is it show on browser in hindi ?
Should i setting something in IIS?
Can i store both (English and Hindi ) content with table column as "CHARACTER SET utf8 COLLATE utf8_polish_ci NOT NULL".?
waiting for ur response.
Rajesh
Life is not easy ,let's make it.
|
|
|
|
|
asprajesh wrote: Really ur suggetion is quite good but when u echo the table value is it show on browser in hindi ?
Should i setting something in IIS?
I don't know , because I've not worked with IIS, I've usually worked with Apache.
asprajesh wrote: Can i store both (English and Hindi ) content with table column as "CHARACTER SET utf8 COLLATE utf8_polish_ci NOT NULL".?
You should try it, and see the result.
|
|
|
|
|
I have applied CSS in Crystal Report10, it is working when i export the report in HTML Format, but it is not working when i export in PDF Format. If any have the solution plz send me........Thx.....
|
|
|
|
|
Does anyone know of an event that fires when a value is set on an element from within JavaScript? Example: $get('id1').value = $get('id2').value (copy values between input controls). Is there an event that will fire on control 'id1' when it is modified this way?
Thanks,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|
|
I am not a javascript expert but I think the answer is no.
You could instead have a function that updates id1, e.g. setID1(value) and then it could do the work of the event handler you want.
'Howard
|
|
|
|
|
Thanks for your answer. It was what I expected, but I want to know how in a world of security, there is not a way to see when your values have changed by someone other than the user.
Thanks,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|
|
Javascript runs on the browser.
You can assume absolutely nothing about the browser or its security.
It would be easy enough with modern debugging tools like FireBug etc to stop a javascript function, change some values and continue.
Keep all sensitive information on the server.
'Howard
|
|
|
|
|
Actually I ready keep the sensitive information on server only, but there comes a time when knowing when an element has changed a value could be useful. I find the reasons more compelling as I use AJAX and client side scripting. An example would be for an extender control that needs to do some action when the control that it has extended (i.e. text input) has had its value changed is used to set other internal things within the control. If there was a trigger that fired when this happened, you would not force a programmer to use your behavior to set things up when the value changed. I know that under the current paradign this is not a common occurance, but in the future it could become a greater problem in making more user friendly applications. Just my thoughts.
Thanks for your time,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|
|
i will explain my problem.
I have one.html, from one.html if i click next then go to two.Html next click three.html.
In two.html,three.html i have GOMain link then it will move to again one.html.
Same way,Lets take 100.html .101.html,103.html
think One.html,100.html are Main Pages . From These Main pages navigation will start to next next pages whereever if i click Back TO Main then it should come to Main page , 100.html or One.Html
One important thing:
One.html,100.html Main pages also not fixed,these are Dynamically Created Pages.
thanks.
GOVIND
|
|
|
|
|
use Windows.History() to acheive this
and have a look on History.Forword(1), History.Forword(2) , History.Go()
This will help you.
|
|
|
|
|
hi, i have this console application which is ment to synchronize data using CRM webservice.
that application went well until just now, there was an error occured. when i traced the
error it was on the retrievemultiple method. the error code is 0x80040216, it says "An
unexpected error occurred. Platform." before that the only error message that i got is
"Server was unable to process request"
i'm really stuck on this issue, i got confused because when i tried to update the web
references, the CRM server somehow did not respond, so i failed to update the web
references. after i reset the IIS on the server, i was able to update the web references.
the web reference i'm using is CRMService and MetadataService. could anybody help me??
thanks in advance.
|
|
|
|
|
I use following code of in ASP, and the respective JavaScript
first 2 line of JavaScript working well
but JavaScript onMouseOver is not working
Please help
HTML code in ASP
Javascript code
document.getElementById("tempimg1").src = image;
document.getElementById("cmbSkin1").value = name;
document.getElementById("tempimg1").onMouseOver = function(){showtrail("\'"+ image +"\'"+,+"\'"+ name +"\'"+,+430,438)}
I also used follwing
document.getElementById("tempimg1").onMouseOver = showtrail("\'"+ image +"\'"+,+"\'"+ name +"\'"+,+430,438)
document.getElementById("tempimg1").onMouseOver = "showtrail("\'"+ image +"\'"+,+"\'"+ name +"\'"+,+430,438)"
I also searched on google
Applied logic, but not succeed
Please help
Amit Battan Ror
battan20@gmail.com
|
|
|
|
|
I am using
<a href="#" onMouseOut="rollOutImage('imgHome')" onMouseOver="rolloverImage('imgHome');"><img id="imgHome" style="border:0px" src="Images/btn_home.jpg" alt="Home"></a>
And it is working fine.
The one u are using and the one i am, the difference is in Case.
Please try it, as i am not facing any issue
|
|
|
|
|
Hi,
I have 2 divs next to each other. They are each 50% wide. It works fine. In the left div I have a header text which is 20px, and in the right div I have text that is 13px. Now because the left div is higher, the right div's text is displayed at the top, it's not vertically centered. How do I get the right div to display in the middle vertical alignment? I tried vertical-alignment:middle but it does not work.
Please can someone help?
Thanks
Brendan
|
|
|
|
|
1. The two div should with a height, 100px for example.
2. 'display:table-cell' and 'vertical-align:middle' can help you.
3. The test code is as follow, it OK with IE6, more please email me.
4. It maybe sorry that my english is poor.
<code>
<style type="text/css">
.main {
width : 100%;
height : 100px;
display : table-cell;
vertical-align : middle;
}
.mydiv {
width : 50%;
float : left;
border : 1px solid #0099cc;
}
.leftfont {
height : 100px;
font-size : 20px;
font-weight : bold;
}
.rightfont {
height : 100px;
font-size : 13px;
font-weight : normal;
}
.fixie {
width : 0;
height : 100%;
display : inline-block;
vertical-align : middle;
}
</style>
<div class="main">
<div class="mydiv leftfont">
I am Kexian Li
</div>
<div class="mydiv rightfont">
<span class="fixie"></span>
Hi, I am a Chinese, welcome to china!
</div>
</div>
</code>
Welcome to China.
|
|
|
|
|
Hi, I have generated proxy class from WSDL and I want to apply breakpoint in the proxy class. When i do it, i never reach there. Can it be possible to do it ?
thanks in advance !
|
|
|
|
|
I'm trying to debug a third party web service by examining all the data sent to and from the 3rd party via their web service. Does anyone know of any good tools that I can use to examine the data being sent between my web application (I'm consuming the web service in a web application) and the 3rd party.
I tried Fiddler2 but, while it shows my pages requests, it does not show the web service requests.
|
|
|
|
|
|
Hi all,
i have a problem with jquery tabs.my scenario is that in my asp.net form using jquery tabs library.I have three tabs and one post button,post button on third tab when i click post button tabs reloaded then returning first tab. How can i solve this issue? any suggestions?
My code is:
<script type="text/javascript" language="javascript"><br />
$(document).ready(function() {<br />
$("#example > ul").tabs();<br />
});<br />
</script>
thx for your replies.
Delphi,Php,C# Junior Developer
"Humans coded by DNA language"
|
|
|
|
|
Hey everyone,
I need some help with displaying a flash application on an embedded HTML control. I'm using the example that I got from Jeff Glatt. Everything can be viewed here: http://www.codeproject.com/KB/COM/cwebpage.aspx. I can go to different sites but I was wondering if anyone would know how to embed a flash application onto the the embedded HTML control. Many thanks to anyone who can help me cause I could really use some right now.
|
|
|
|
|
I am so dumb... I should have place this in the discussion on the article.... sorry.
|
|
|
|