F
Fariba
Hello ,
I am trying to call a mthod with the following signature:
AddRole(string Group_Nam, string Description, int permissionmask);
Accroding to msdn ,you can mask the permissions using pipe symbol .for
example you can use something like this
AddRole("My Group", "Test", 0x10000000|0x00000002);
Porblem is ,I am getting this permission mask from a checkboxlist and I have
stored all these numbers (like 0x00000002) in its value property. When use
selects multiple checkboxes I dynamically generate a pipe delimited string
and when I convert it to int (either using
int.Parse(my_pipe_delimited_string) or
Convert.Int32(my_pipe_delimited_string)) I get object reference set "Object
reference not set to an instance of an object".
if I just mention 0x10000000|0x00000002 in the method that's fine ,but it
seems I cannot dynamically generate it from the user's input.
Your help is much appreciate.
Bye
I am trying to call a mthod with the following signature:
AddRole(string Group_Nam, string Description, int permissionmask);
Accroding to msdn ,you can mask the permissions using pipe symbol .for
example you can use something like this
AddRole("My Group", "Test", 0x10000000|0x00000002);
Porblem is ,I am getting this permission mask from a checkboxlist and I have
stored all these numbers (like 0x00000002) in its value property. When use
selects multiple checkboxes I dynamically generate a pipe delimited string
and when I convert it to int (either using
int.Parse(my_pipe_delimited_string) or
Convert.Int32(my_pipe_delimited_string)) I get object reference set "Object
reference not set to an instance of an object".
if I just mention 0x10000000|0x00000002 in the method that's fine ,but it
seems I cannot dynamically generate it from the user's input.
Your help is much appreciate.
Bye