|
Does anyone know of any examples of custom Members ships with a Sql database that is not created through the asp.net configuration? If so please help.
|
|
|
|
|
|
Hi,
I need urgent help for the situation iam facing. Appreciate any help.
The situation is very similar to what is achieved on this codeproject site. When someone tries to download some code sample or zip file without logging in it redirects the user to login first.
I also need to restrict access to image files, so if a user tries to access image file by entering the url, it should send to login page.
Since the images are opened individually, i am not opening them in any browser, so cannot write authentication code. Basically the images can be accessed directly by entering path. How to restrict it unless user is logged in?
Thanks,
stanwar.
|
|
|
|
|
May be i am not get your question perfectly
but u can use ---
Querrt string. When any user click for url that page is automatically generate some extra code like username and some thing else that will decode at server side.
Also u can think about session object too. Some times it come hendy too..
Viral
|
|
|
|
|
|
Thanks for the replies.
Yet I think my question wasn't clear. The directory I need to protect contains pdf files/images, which should be available to logged in users only. And pdf/images in a website can be directly accessed from url. How to restrict their access?
|
|
|
|
|
Sir,
I have to make a liberary management project .Can u please send any link for the project.
Thanks
|
|
|
|
|
go to this url http://www.vbcode.com/
then search for "library" before hitting search button make sure drop down lost says Exact Phrase
you will find lots of samples
|
|
|
|
|
Hi,
Im using an SQLDataSource to get data from an SQL DB. The DataBind is set to occur at Page_Load. In the code behind i need to capture the data as variables. The data returned is for just 1 record, and is set up via the DataSource wizard in VS2005.
How do i get this data into the variable?
At present i'm trying the following code in the Page_Load event:
<code>staffEmail = DataBinder.Eval(Container.DataItem, "staff_Email").ToString();</code>
However this says 'Container' does not exist in the current context. So how do i retrieve this information??
Any help would be appreciated.
Thanks.
|
|
|
|
|
U can use
Eval("staff_Email") directly no need to do DataBinder.Eval
May be it Possible that .net 2.0 is not support Container code. also u dont have to mention tostring() in behind..
Viral....
|
|
|
|
|
I tried that and got the following error:
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
Any other suggestions?
|
|
|
|
|
Sorry to reply u late...
Ya you are right it is not going to work. but you can do one thing ---
U can use page_load event of page and write the code some thing like this
=============================================
TextBox1.Text=Ds.Tables[0].Rows[0].ItemArray[1].ToString();
=============================================
it will work and do as you like
it just take little but can helpful.
you just have to creat a dataset or even datatable or even datarow as u like and will work perfact
Viral
|
|
|
|
|
I have two textboxes and want this comparevalidator to do a case insensitive comparision.... is there any workaround?
Thanks in advance
|
|
|
|
|
|
while opening below mentioned web link it says that i am not authorized to view this page. could you please copy paste the contents of this page if possible?
thanks a lot
|
|
|
|
|
|
Ok i was able to open that link but its not what i am looking for. That link only shows the working of compare method. i am looking for comparevalidator control to do case-insensitive comparison.
|
|
|
|
|
http://www.nedcomp.nl/support/origdocs/dotnetsdk/cpref/frlrfsystemstringclasscomparetopic5.htm
copy that link and paste into browsers address bar.
|
|
|
|
|
Hello,
I have a Web.sitemap file. I created a SiteMapDataSource.
Every node on my Web.Sitemap have a property named Visible which is set to true or false.
I need my SiteMapDataSource to get only the nodes from Web.Sitemap which has the property Visible="True".
How can I do this?
Thanks,
Miguel
|
|
|
|
|
You could turn on SecurityTrimming so that you can set which roles can see which items in the Sitemap, then set the ones you want invisible to a non existant role.
|
|
|
|
|
Is not any other solution?
Web.sitemap is basically a XML file.
I supose I could go through each item on the SiteMapDataSource ...
Is is just that roles for this doesnt seem the best way to solve this.
Thanks,
Miguel
|
|
|
|
|
Instead of having a sitemap with Visible property
it's easier to have 2 sitemaps:
1. with visible nodes only
2. with all the nodes
This will allow you to bind the menu control to the visible sitemap
and to get other nodes from the other sitemap
you can configure the names of the 2 sitemap providers in web.config
see this msdn article to know how:
http://msdn2.microsoft.com/en-us/library/ms178426.aspx[^]
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
|
|
|
|
|
Hi,
Are you talking about dependent site maps?
I will explain my problem:
My web site uses two different web site maps:
1. The full one which is used in the menu.
2. The most restricted one which is a part of (1) and that is used in footer links.
3. In both cases I need to have everything in two cultures: English and Portuguese.
Could you give me your opinion of how to create this?
Thanks,
Miguel
|
|
|
|
|
I'm not sure if you can create resource files for sitemaps to localize them.
I had a similar problem before and I had to create a different copy of sitemap for each language.
In your case you will need 4 sitemaps (2 for each langauge) and have some code to decide which sitemap that will be used according to the current culture.
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
|
|
|
|
|
After searching the MSDN I found that you can have resouce files for sitemaps to localize them.
check this page:
http://msdn2.microsoft.com/en-us/library/ms178427.aspx[^]
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
|
|
|
|