|
hi, i don't know if this is the correct forum if not please transfer it to the correct one.
i have a question how to handle userrights.
at the moment i wanna make for my page userrights which menupoints the user can see. i don't use the asp.net membership provider. i have a user table , a role table a rolegroups table and a userright table.
when a user is logged in i look in the userrights table (from my masterpage where the menulinks are created) which menupoints the user can see (for example the user1 is in the group visitor1 he can see link1,link2, link3)
user2 is in the group visitor2 he can see link2 and link3
what are the best way to handle this ? because my solution is very slow. specially how can i use session variables or is there an effectiv solution
|
|
|
|
|
Why is it so slow ? Perhaps you need to reengineer it ? How are you generating menus ? I'd think if the menu never changes,. you could indeed generate it once, then store it somewhere. Or if it takes a long time to generate, you could generate it and store it so that you can just pull it from your DB, for example, without having to do the calculations every time.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
By using javascript also you can set the access for different user's
|
|
|
|
|
I have an .ashx file that loads an image (specified by id in querystring) and then writes it out to the client. This works perfectly in Firefox, but all I get is a red X in IE7 (I have no way to test IE6). Here is the method:
<br />
public void ProcessRequest(HttpContext context)<br />
{<br />
int contribId = Convert.ToInt32(context.Request.QueryString["id"]);<br />
byte[] buffer = Contributor.GetImage(contribId);<br />
<br />
context.Response.ContentType = "image/jpeg";<br />
context.Response.BinaryWrite(buffer);<br />
}<br />
Any idea what is wrong with this?
|
|
|
|
|
you could try
public void ProcessRequest(HttpContext context)
{
int contribId = Convert.ToInt32(context.Request.QueryString["id"]);
byte[] buffer = Contributor.GetImage(contribId);
context.Response.ClearContent();
context.Response.ClearHeaders();
context.Response.ContentType = "image/jpeg";
context.Response.BinaryWrite(buffer);
context.Response.End;
}
I didn't get any requirements for the signature
|
|
|
|
|
Ok, so come to discover that there was some issue with the image itself and Firefox could display it, but IE could not.
Thanks for you suggestion though.
|
|
|
|
|
hi
I want to create asp.net website using CMS
say for example with umbraco or DotNetNuke
database is mysql
.net 2008 express edition
IIS 5.1
can u guide me how i can start building it
i have tried with dotnetnuke and umbraco but both r problematic with mysql
and also dificult to configure
if u know any other CMS pls let me know but supportable to mysql,.net2008 express, IIS5.1
Ravie Busie
Coding is my birth-right and bugs are part of feature my code has!
|
|
|
|
|
RaviBusie wrote: i have tried with dotnetnuke and umbraco but both r problematic with mysql
What is the problem with DNN ? which version of DNN are you using ? How did you start to build a web site using DNN ?
However, I think the main problem concern is your Data Base. Only the SQL Server data provider comes default with the installation of DNN . For MySQL you have to cutomize the code. you can check this like[^] for mysql provider.
But why are you going for Mysql ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Is there a control I can embed in a page that will allow my user to view and print a PDF file, without requiring the installation of browser-plugin?
|
|
|
|
|
No. Either way, you have to have a control that needs to be downloaded via the browser (such as Active X) or the client must have a locally installed a PDF viewer.
A PDF cannot be re-rendered in anything else without losing formatting and hence losing your ability to print a controlled format document(such as is a PDF). If you could give a stink about formatting, layering or built-in functionality, then convert it prior to viewing, otherwise you are stuck.
|
|
|
|
|
You can achieve something like this by converting the pdf into HTML at server and display it to the browser.
|
|
|
|
|
If it's a particular PDF available on your server (or they are going to upload it first) then you could convert teh PDF to 'some other format' either HTML or image, and then they could print it from their browser without a plug in - but it's unlikely to look pretty.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Hi,
While working with SSRS programmatically using C# , ASP.Net 2.0 , the web page is loaded with report from the report server and the issue is with the link buttons and + / - ( Drilldown ) , by clicking on these button its url pointing to the actual report server, thus giving an parameter error. So my wish is to disable all those button's urls. Any idea to get this done , that would be great to me. Thanks in advance.
Regards
Siji.S
.Net Developer
|
|
|
|
|
SSidharthan wrote: SSRS
your and and what you working on starts with SS, is this a joke
Seriously, is there anything in Sql Server Reporting Services documentation how to do this? Why are you getting an error? Try to figure out the source of the issue, rather than simply disabling it.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hello.
I need your help. I have to build a web service that returns a xml with some data from a SQL Data Base. Witch is the best and more effective way of accomplish that?
Thanks all.
|
|
|
|
|
huh? do you know how to build webservice? If so, what is your question?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Yes i know how to build webservices but it's the first time i have to build one that has a method that returns xml. It's the first time I will write/read XML programatically, so any help or guidance will be appreciated.
|
|
|
|
|
|
Thanks Man. You helped me alot. You solved my problem.
|
|
|
|
|
Great! Go ahead.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi all,
I have tried following codes :-
window.opener.location.reload(true);
and
window.opener.document.forms[0].submit();
these are working for normal popup but doesnot work for showmodaldialog() method and it displays an Javascript error that cannot find object.
How will I refresh my grid, which is in parent page and within a update pannel,when I will click on the close button of the chield page the chield page(showmodaldialog()) should close and the parent grid should refreshed with the changed data.
-----------------------------------------
window.opener.location.reload(true);
for a 'normal' window, but this doesn't work for showModalDialog. It is
modal as far as the client is concerned but not the server...
In my app I have a datagrid on the main aspx page, I pop up a modal dialog
to edit a record. On closing the modal dialog I'd like to refresh the
datagrid with the new data.
----------------------------------------------
Please help!!!!!!!!!!!!!!
Thanks and Regards
Bikash
|
|
|
|
|
I am also having the same issue ?.Does anyone have solution for this ?.
K.Anantha rengan
|
|
|
|
|
I have one datagrid,i want to add a
textbox in footer,and the code is below,but
i am not getting it.One header("comments") is there and
i want to get the textbox under(ie in footer)that header
<asp:TemplateColumn HeaderText="Comments">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemTemplate>
<a href="javascript:void(window.showModalDialog('HRComments.aspx?CID=<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>&QStringCandtName=<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>',null,'dialogHeight:12em;dialogWidth:15em;status:no;scrolling:no'));" onmouseover="Javascript:abc();">Comments</a>
<!--<a href="#" onclick="ShowDetails();GetCandId('<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>','<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>',popHRComments)">Comments</a>-->
</ItemTemplate>
<FooterTemplate>
<asp:TextBox Runat="server" ID="txt">Total </asp:TextBox>
</FooterTemplate>
</asp:TemplateColumn>
|
|
|
|
|
use the mark up below.
<a href='javascript:void(window.showModalDialog(''HRComments.aspx?CID=
<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>
&QStringCandtName=<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>''
,null,''dialogHeight:12em;dialogWidth:15em;status:no;scrolling:no''));'
onmouseover="Javascript:abc();">Comments</a>
---------------
Basically problem was due to the intermingling of single and double quotes.
What you need to do is use single quotes for begin/end strings in javascript and if there is any single quote inside a javascript string itself put two single quotes ('') as i have used above.
e.g. ... showModalDialog(''HRComments...
in above line of html there are two single quotes and not a double quote.
And the double quotes should be used only within sever tags.
I hope that helps.
s.a.w.
|
|
|
|
|
hello friends...
I want to get the full path of the selected file.
i have done it using FileUpload1.PostedFile.FileName ....
but the problem is everything is working fine in IE ....but not in mozilla...safari....
actually i want to get the full path of the selected file...not the file name only..........
I want to know about that file means...that file has from which drive/folder....that information will store in text file
thank you.....
|
|
|
|