|
You should try searching on google for questions like that before you post here, im sure someone else will say the same
|
|
|
|
|
Syed Kamran ul Haq wrote: I have to implement field level security in web application
What do you meant by field level security ?
|
|
|
|
|
just like we give rights to a web form to according to user, i have to give rights to a web control in a web page(e.g visible or enable = true/false) according to user.
Example:
Admin can edit a textbox 'txt1' in a web page page1.
Jeo can just view a textbox 'txt1' on the same page.
I am creating a web page in which i will select a web page from DDL. All the control on selected should be shown, so that i can give rights to them.
Thanks for answering.
Regards Syed Kamran ul Haq
ALLAH HAFIZ
|
|
|
|
|
Your requirement seems to be odd. I don't think that you can have field level security as you told. Alternatively, you can implement a rule validation system to your business objects in the same way like CSLA does. Then add rules for different kinds of user, and when user trying to save the BO, throw error indicating the broken rules.
|
|
|
|
|
You should use the standard asp.net login control and then through the web configuration you can then asign rights to users.
If you dont want to do that use the following:
Put a column in your login table and call it permissions, then set the permissions as so:
User1 rights = 0
Admin rights = 1
then just check this value in your c# code e.g.
if (rights = 1)
{
txt1.enabled = true;
}
else
{
txt1.enabled = false;
}
something like that, remember what Ive written is half pesudo code so you just need to amend that
|
|
|
|
|
Please don't ask variations of the same question over and over. Continue the discussion where it was started. If you want quicker answers, ask clearer questions to start with.
Your best bet is to build the lists yourself, not try to auto generate them.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello friends.......
I want to move some text from one textbox to another textbox on onblur event..
I have this javascript code that is working perfectly with the HTML controls
function putMailid()
{
var x=document.getElementById("txtLogin").value;
document.getElementById("txtEmailID").value=x+"@gmail.com";
}
but i don't know that how to use it with asp.net textboxes..
Bcoz there is no Onbluer event......
Plzz help me out
Deepak Nigam
|
|
|
|
|
I recommend you do some reading on ASP.NET. Basically, just because the IDE doesn't show you an event, doesn't mean it doesn't exist, it just doesn't exist on the server side. You can add an onblur to a textbox, and it will be passed to the client and work perfectly.
Your next problem is getting the cliend side Id of your textboxes. This is represented by the ClientID property of your server control. You need to write that to the client, either inline in your script, or as script that creates js variables you can use. Also never call document.getElementById and assume it returns something, add a step that checks it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
how to get the Process name which is accesing/ using my file. I want to get the process name which is reading my file using web application
Thanks in advance
|
|
|
|
|
What you want is impossible. A web app runs in the browser, and cannot enumerate processes on the local machine. Why would you want to do that ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have the following code:
When it runs I get the error:
<b>System.InvalidCastException: Specified cast is not valid.</b>
chkIgnore = a checkbox
Ignore = a field in a database type nvarchar size 1, can either have Y or N in the column
If anyone can help that would be great, bit stuck on this one.
thanks!
protected void OnRowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
bool ignore_box = true;
if (DataBinder.Eval(e.Row.DataItem, "Ignore") != null)
{
if (DataBinder.Eval(e.Row.DataItem, "Ignore").ToString() != "Y" || DataBinder.Eval(e.Row.DataItem, "Ignore").ToString() != "N")
{
ignore_box = (bool)DataBinder.Eval(e.Row.DataItem, "Ignore");
}
if (ignore_box == true)
{
((CheckBox)e.Row.FindControl("chkIgnore")).Checked = true;
}
}
}
}
|
|
|
|
|
.netman wrote: DataBinder.Eval(e.Row.DataItem, "Ignore")
You're calling this method three times because...... ????
.netman wrote: Ignore").ToString() != "Y"
.netman wrote: (bool)DataBinder.Eval(e.Row.DataItem, "Ignore");
You're assuming because the the field is not a string starting with Y or N ( and not y, n, t, T, F, f, or any other letter or character ), it must be a bool. Either your data source is seriously messed up, or your understanding of how this works is. Judging from the error message you're getting, I'd say the latter. You can't just convert anything to a bool, it has to be a bool. It's obviously not. At a minimum, you should put this code in a try/catch, and then set a default. Probably, you should replace it with a default.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I managed to sort it
The database field was set as nvarchar so I changed it to bit.
Then I changed or the N and Y to 0 and 1
Its all working now!
Its always better when you fix it yourself
|
|
|
|
|
Yeah, doing it right in the first place helps
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
but if i did that I wouldnt get such great answers from people like yourseleves!
|
|
|
|
|
*grin*
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anyone have any idea how I can set a transparency key for an image (Most likely white or, my favourite, Fuschia) - Normal C# has the .MakeTransparent(Color.Fuschia);, yet the ASP.NET Image boxes seem to lack the method...
I have code to pretty much create small images over a large image, which are being loaded from the web, and they're not exactly square, and these random white boxes are... disorienting
Maybe a way to customise a .jpg to be transparent by default, and THEN upload it... ?
Any help would be GREATLY appreciated!
- Reelix
|
|
|
|
|
I believe that later versions of IE support transparency in PNG images.
Also, ASP.NET is constrained by what HTML allows.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Well, it seemed it needed an actual transparency settings.
Paint.NET's transparency function worked wonders
Thanks anyways
- Reelix
|
|
|
|
|
My web site uses PayPal for payment, but problem is how the server is notified of all payments as they happen.bcos paypal simply redirect back to yrs page back once payment is done .So how i will update all these transection to my server
Plz help Me
Raghvendra
|
|
|
|
|
check this out, might help
http://www.codeproject.com/KB/aspnet/UsePayPalPaymentInASPNET.aspx
|
|
|
|
|
Hi all
i was downloaded the mathml control and alrady added on my page for entring mathmatics equations on my webpage, its woking fine but i have no knowledge how to use that control. I want to save that equation into the database and use that for displaing also but i dont know how to do the same.
Plz do reply
Yogesh Agarwal
|
|
|
|
|
If the control is a CP article, ask in the forum provided by the article. If not, look for a forum where you downloaded the article. Most people here will not have used it, so how can we help ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for the reply, i am also looking for the same but i didn't find any fourm could you give me some links where i could read the article.
or
plz tell me only how could we use the addtional controls in our asp.net pages which are downloaded from web. i tried to use others also (other than mathml) it gives me the error as follows
Error 1 The type 'System.Windows.Forms.UserControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. E:\projects\mathtype\Default.aspx.cs 24 9 E:\projects\mathtype\
you just help me to remove the same rest i tried to search by other resources.
thanks again for reply.
with regards
Yogesh Agarwal
|
|
|
|
|
Ah - the problem is that you're trying to use a windows control in a web application. You can't do that.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|