|
Im sorry, but your question is no more or less urgent than anyone else's. Its generally considered rude to expect your question to be answered "Urgently".
As for your question, the answer really depends on how you identify Admins/Non-Admins in your application. For example, in my application I use the built-in ASP.NET role-based security, and so In a control, I could do something like
if(!Page.User.IsInRole("Administrators"))
{
}
|
|
|
|
|
I believe that something like this would help you:
In the menu.ascs file's Load Event the following code would work to disable that menu item
if (Session["IsAdmin"] == false)
{
this.Menu1.Items[2].Enabled = false;
}
This is the way that I came up with to accomplish this task. You could also generate the menu at runtime and if the user is an not an admin just don't create the Operation menu.
|
|
|
|
|
Member 2842468 wrote: I am new in develoment
Someone who is 'new to development' should not be written commercial code and sure as hell should not be writing permissions systems. The people paying you a pittance are going to get exactly the system they deserve, but when reality sets in, you will be out of a job unless you do some work to build a basic skillset.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
how to resize the gridview header in runtime?
send me usefull URL's.
Chandhu
|
|
|
|
|
Google[^]
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
hi , help me in executing a procedure with out parameters ,i have tried like this , i need to declare a out put parameter.
declare @para_ok numeric(5,0)
exec dbo.procname 59171, @para_ok output
private void GenerateCSVFile()
{
int intStatus = -1;
for (i = 1; i < ddlDraw.Items.Count; i++)
{
OdbcCommand oCmd = new OdbcCommand("{"+ intStatus +"=call procname (" + ddlDraw.Items[i].Text + ")}", conn);
oCmd.CommandType = CommandType.StoredProcedure;
try
{
conn.Open();
oCmd.ExecuteNonQuery();
}
catch
{
valSuccessMsg.ErrorMessage = "File is not generated.";
valSuccessMsg.IsValid = false;
}
finally
{
valSuccessMsg.ErrorMessage = "File is generated successfully for STT Game.";
valSuccessMsg.IsValid = false;
conn.Close();
}
}
}
|
|
|
|
|
Hi,
i'm just guessing, but what if you try to use it like a query?
... new OdbcCommand("Call Proc...
// remove this line - oCmd.CommandType = CommandType.StoredProcedure;
OdbcDataReader dbReader = oCmd.ExecuteReader();
// access the first row and first column to get the result
if you run the command within ISQL you got the result displayed like a table, or not?
Regards
Sebastian
P.S.: Next time you should post this to the General Database forum!
|
|
|
|
|
Dear Expert,
My website worked fine on local machine but throw an exception when running on hosting. Please look at following exception.
Some infomations about my site:
- Asp.net 2.0.
- Used Eucalypto open source, dll file (NHibernate).
- MsSql 2005.
Any help is appreciate!
Exception here:
NHibernate.MappingException: Could not compile the mapping document: Eucalypto.Forum.Message.hbm.xml.
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Thanks,
Nhan
|
|
|
|
|
Try setting the trust level[^] to FULL. If that is not working, I believe you need to contact the hosting provider.
|
|
|
|
|
Thanks Navaneeth, thank you for your replying quickly.
I tried to set trust level to FULL but it was not work. And I contacted with the hosting provider, the problem was solved .
Nhan
|
|
|
|
|
all the permission has been set in containing folder?
Anshuman Singh
|
|
|
|
|
please use
<trust> level="[Full]"
originUrl="URL"
processRequestInApplicationTrust = "[True]"
/>
Anshuman Singh
|
|
|
|
|
Hi,
Is there any way to fill datatable with value form a repeater?
thanks in advance
|
|
|
|
|
What is the data source for repeater? You can iterate it and add rows to a DataTable.
|
|
|
|
|
ya. i solved it. thanks for your reply
|
|
|
|
|
Hello Experts,
There are some date columns in my data grid. The data in a date column is like below:
"01/11/2010"
But when I press the update button on the gridview then the edititemtemplate directly converts the data as:
"01/00/2010"
What is the problem??..Please help...
|
|
|
|
|
from where this value come 01/11/2010 wat code u use for it..
|
|
|
|
|
I havent used it.. The update code of the gridview is like below.There is no mistake...
UPDATE [CP_MASTER]
SET [ORDERNUMBER] = @ORDERNUMBER,
[NEWRPT] = @NEWRPT,
[UNICLODEL] = CAST(@UNICLODEL as smalldatetime),
[SUPPLDEL] = @SUPPLDEL,
[CUSTOMER] = @CUSTOMER,
[DEPARTMENT] = @DEPARTMENT,
[SUPPLIER] = @SUPPLIER,
[LINE] = @LINE,
[COLORS] = @COLORS,
[QTY] = @QTY,
[NOTES] = @NOTES,
[RATIO] = @RATIO,
[WC] = @WC,
[KIMBALL] = @KIMBALL,
[LAPDIPSENT] = @LAPDIPSENT,
[LAPDIPAPPRV] = @LAPDIPAPPRV,
[WASH] = @WASH,
[WASHTYPE] = @WASHTYPE,
[PRINTX] = @PRINTX,
[PRINTAPPRV] = @PRINTAPPRV,
[EMB] = @EMB,
[EMBAPPRV] = @EMBAPPRV,
[BULKFABRICARRV] = @BULKFABRICARRV,
[FITSENT] = @FITSENT,
[FITAPPRV] = @FITAPPRV,
[SIZESETSENT] = @SIZESETSENT,
[SIZESETAPPRV] = @SIZESETAPPRV,
[SEALERSENT] = @SEALERSENT,
[SEALERAPPRV] = @SEALERAPPRV,
[BULKFABRICTEST] = @BULKFABRICTEST,
[GARMENTTEST] = @GARMENTTEST,
[CUTDATE] = @CUTDATE,
[SEWING] = @SEWING,
[MIDINSPECTION] = @MIDINSPECTION,
[PRODSENT] = @PRODSENT,
[PRODAPPRV] = @PRODAPPRV,
[INSPECTIONDATE] = @INSPECTIONDATE,
[STATUS] = @STATUS
WHERE [ORDERDATE] = @ORDERDATE AND [ONUNICLO] = @ONUNICLO AND [STYLE] = @STYLE AND [MERCH] = @MERCH
|
|
|
|
|
Hello All,
I have a hardcoded datatable ,i want to return this datatable in form of dataset which i have to bind a gridview.
Please tell me how can i do this
Thanks in advance
Ritz
|
|
|
|
|
you can directly bind the datatable with grid. Is there any special reason for binding dataset?
|
|
|
|
|
gridvew1.datasourse = dt;
directly bind it with grid view.
|
|
|
|
|
When i run the .Net program, the IE was half sized. How to get the fully sized window while executing the project?
|
|
|
|
|
use following script in your head tag
you problem will be resolved.....
<script language="javascript" type="text/javascript">
window.moveTo(0, 0);
window.resizeTo(screen.width, screen.height)
</script>
umerumerumer
|
|
|
|
|
S. Its working.Thank u for your help.
|
|
|
|
|
this is the good answer
Anshuman Singh
|
|
|
|