Web Forms :: Dynamically Create Xmlsitemap Provider?
Oct 8, 2010Is there a way to dynamically create an xmlSiteMapProvider at runtime and associate it with a sitemap file on the server.
View 8 RepliesIs there a way to dynamically create an xmlSiteMapProvider at runtime and associate it with a sitemap file on the server.
View 8 RepliesI am using a XMLSitemap to show my menu. In my menu I have a node "Log in". But I only want to show this to the visitors who are not logged in. (Not to everyone like what the "*" does). Is there a rolename for those visitors or something like that?This is my XML SiteMap
[Code]....
I want to add/edit available siteMap providers in web.config file from code behind.
I am using the siteMap providers currently in the application web.config in a format given below:
<siteMap>
<providers>
<add siteMapFile="~/App_Themes/MyAppDefault/MySiteMap.sitemap"
name="MyAppDefault" type="System.Web.XmlSiteMapProvider" />
</providers>
</siteMap>
This is allowing my application user to show up a different Site Map as and when the theme is changed.
But when I tried to do the same with the following code I faced with an issue.
configuration = WebConfigurationManager.OpenWebConfiguration("~")
section = CType(configuration.GetSection("system.web/siteMap"), SiteMapSection)
Dim provider As New ProviderSettings()
If Not section Is Nothing Then
provider.Name = txtError.Text
provider.Type = "System.Web.XmlSiteMapProvider"
section.Providers.Add(provider)
configuration.Save()
End If
This code is not allowing a provider.siteMapFile property (provideer is the ProviderSettings object).
As well the maximum possible way I can add a new SiteMap provider in web.config is as follows
<siteMap>
<providers>
<add name="MyAppCustom" type="System.Web.XmlSiteMapProvider" />
</providers>
</siteMap>
If anybody can suggest a way for me to add/edit the 'siteMapFile' attribute of the provider.
I'm currently in the process of creating a webshop. This webshop supports theming, but I also want customers to choose a lay-out. I can create multiple masterpages and create a handler to dynamically set the correct master page. But some components, like the shopping cart, are controls which have to be present in the master page and are also used in the aspx pages. The shopping cart control for instance, has an Update method which is called whenever the user adds a product to their cart. So the question is: can I somehow create a default masterpage which has all the components on it, but still be able to create multiple lay-outs. And how should I reference that master page from the aspx pages? I also thought of creating an Interface class which defines the masterpage and it's public components, but I don't know if I can reference an interface from aspx pages.
View 8 RepliesI'm building an application that will be used by a number of different schools who want completely separate databases so I've decided to have multiple connection strings and membership/role providers in my web.config file. In my code, I'm trying to set which connection string and provider to use at runtime for the correct database according to the logged in user.
I'm coming into a lot of bits in my code that previously worked fine, that now don't. For example, I used to use:
[Code]....
But now that I've changed it to this, it doesn't work anymore:
[Code]....
The compiler tells me that AddUserToRole is not a member of 'r'. I've had similar problems not just with Roles but Membership too, like with calling CreateUser.
I'd still like to be able to use all these methods that I was using before which are extremely handy. I just want to be able to set the membership/role provider at runtime rather than use the default one. Am I doing something wrong? Is there a simpler way to go about this?
How do I create a custom membership for ASP.NET MVC 2 based on the ASP.NET membership provider?
View 5 RepliesI am working on a new project using ASP.NET 4 and I have a few Resource Files.However, I also have resources on a SQL database. I would like to somehow create a common resource provider.I would like to be able to use:
Resources.Labels.Email > This would take the resource Email from file Labels.
Resources.Database("Email") > This would take the resource with name "Email" from the database.When I get a resource from the database I always return the Name, Content and MimeType.To avoid multiple requests I could even have another method like:
Resources.Database(new List<String> { "Email", "Address" }) > This would take the resources with name "Email" and "Address" from the database in one request.I am not sure if this would be possible ... Basically I would need to have something like:
Resources.Database.Load(new List<String> { "Email", "Address" }); And then use: Resources.Database("Email");
And even have one more:Resources.Config("Email") > This would take the resource with name "Email" from th web.config file. Always a String.I have all the code with communication with the database and web.config.The main problem is really how to create this resource interface.
I am trying to build an application that
1. user can login by their AD account and password.
2. AD account can be assigned to different group.
I know there is a training video - [URL] to teach how to use the tool to provision the membership schema to SQL server for Forms authentication. but how can I use AD authentication with this?
I am trying to create my own profile provider based upon the tables I have made for my website, I have watched the video and read several articles on creating one, but none of them goes very indepth when you have several tables and groups to profile from. First: I have three groups
1. Employees
2. Customers
3. Applicants
PROBLEM: Video and tutorials don't show how to integrate groups into your profile. Based upon the UserId, I want to load only Table ID's into the profile. IE for a customer it would be
CustomerID from [customer_data]
LocationID from [customer_location]
ContactID from [customer_contacts]......................
My question relates to membership providers. I have two websites that run on two different servers. One website is a community website that uses Telligent community server 2007. The other is a website that contains information. I have a form where users can request more information. What I would like to do is when a user requests more information, automatically create a user account in my community website. I was told that I can create a custom asp.net membership provider that will create a new user account in my community website. I have read some info at msdn and asp.net websites, but I am still unclear as to how I can create a custom membership provider that will work across different websites running on different servers.
View 1 Repliesi am using membership provider to create new user.
View 2 Repliesany tutorials or materials that to implement a custom membership provider where I can using Linq to Entities for data retrieval in its internals?
View 1 RepliesIt's new to me to use the membership provider class.I was able to inherits the MembershipProvider in my library(HDIMembershipProvider.vb) and a lot of functions are generated. When I created the form to create a user like this:
[Code]....
Once the user clicks submit, how this function can be called ?
[Code]....
Each time I submit, the function is never called.
[Code]....
I have a CreateUserWizard that uses the membership provider and creates a user in a sql server database.I need to change the IsApproved property on creation to false.I know that it can be done by createing a custom navigation template... but then i will have to code all the checks for the creation of the user...Is there any other way to access that attribute?this is the aspx code:
[Code]....
I'm using a website as a frontend and all users are authenticated with the standard ASP.NET Membership-Provider. Passwords are saved "hashed" within a SQL-Database.Now I want to write a desktop-client with administrative functions. Among other things there should be a method to reset a users password. I can access the database with the saved membership-data, but how can I manually create the password-salt and -hash? Using the System.Web.Membership Namespace seems to be inappropriate so I need to know how to create the salt and hash of the new password manually.
View 4 RepliesI am trying to create a Linkbutton inside a calendar. Everything works except for the onClick.
Is there a way to make this work?
[code]....
I want to create a custom membership provider which doesnot has Password Question and Password Answer fields. But has some other extra fields.Is it possible? I am asking this because if I inherit MembershipProvider class then I get forced to use default CreateUser Method which has password question and password answer parameters. I don't want these parameters.
View 1 Replieslike if i have a button and i would like when that button is pressed that a completly new page is generated with some elements in it and some code in the code behind.
View 1 Replieshow to create check box dynamically in web forms based on some condition
View 5 RepliesI am trying to create a linkbutton dynamically using visual basic.
I am having trouble creating the "on click" postback to a sub
How To create User Specified Number of Tables.. ?
View 1 RepliesI have register page that in this page I registered users with behcode I want when I register them, Automatically it create sub-domain like below:
1111.behtop.com
I can create sub-domain seprately from host but can I do it when I register users?
I want to create page dynamically in from a master page in code behind in asp.net.
View 1 RepliesMy question is How can i create and add a div tag to my web page dynamically and then create and add a LinkButton into div tag ?
I can do each one separately but I can't How Create and add a linkButton into div tag?
Can anyone tell me as how to create aspx page dynamically.
The controls are defined by user in run time.
Based on that i want to create aspx page.
Else its enough if i am able to generate basic structure of aspx page.(i.e The basic firm which generates when we add new webform in visual studio)Later i can develop with it.