Click here to Skip to main content
15,892,253 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: about asp Pin
SeMartens5-Feb-09 3:41
SeMartens5-Feb-09 3:41 
QuestionRe: about asp Pin
TylerBrinks5-Feb-09 15:31
TylerBrinks5-Feb-09 15:31 
AnswerRe: about asp Pin
Ranjit Viswakumar5-Feb-09 16:34
Ranjit Viswakumar5-Feb-09 16:34 
QuestionCustom WEb Confirm Box Pin
siva4555-Feb-09 3:07
siva4555-Feb-09 3:07 
AnswerRe: Custom WEb Confirm Box Pin
Abhishek Sur5-Feb-09 4:20
professionalAbhishek Sur5-Feb-09 4:20 
AnswerRe: Custom WEb Confirm Box Pin
Ranjit Viswakumar5-Feb-09 16:53
Ranjit Viswakumar5-Feb-09 16:53 
GeneralRe: Custom WEb Confirm Box Pin
siva4555-Feb-09 18:28
siva4555-Feb-09 18:28 
QuestionXMLDataSource.Data not binding right Pin
Yisman25-Feb-09 2:00
Yisman25-Feb-09 2:00 
Hello Everybody.
Its my first time using the CP forum. though I use the articles all the time... Smile | :)
I have some code that builds an XML document for each user that logs in. This xml doc should become the datasource for the navigation system.
I do not use the built-in membership system, but rather have my own "Users" table and do my own authentication etc.
The XML Document is stored in a strongly-typed Session variable (as a public property in a class module). The property name is "CurrentMap"
The problem is that setting XMLDataSource.Data to the xml snippet just doesnt work. when i log in i always see the menus belonging to the previous user which logged in. Only when continuing in the site do i see the menu items based on the current users sitemap.
For testing i used the CurrentMap.Save method to save the doc to disk, and the doc is 100% correct, exactly according to my code. the problem is only on the home page, feels like asp.net is kindly doing some caching which id like to turn off.
It may also be in regard to the events that I use to bind the datasource to the xmldoc, and I used quite a few of them. But maybe im just not using the right one... Sigh | :sigh:
This is happening on the code behind in a Master page in asp.net 3.5.

here is the entire relevant codebehind file for the master page:
 Partial Class IMaster
     Inherits System.Web.UI.MasterPage

     Protected Sub Page_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.DataBinding
         CheckUser()
         xdsSiteMap.DataFile = ""
         xdsSiteMap.Data = CurrentMap.OuterXml
     End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        CheckUser()
        xdsSiteMap.DataFile = ""
        xdsSiteMap.Data = CurrentMap.OuterXml
        xdsSiteMap.DataBind()
        MainMenu.DataBind()
    End Sub

     Protected Sub lkbLogout_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lkbLogout.Click
        ClearUser()
        CheckUser()
    End Sub

    Protected Sub xdsSiteMap_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs) Handles xdsSiteMap.DataBinding
        xdsSiteMap.DataFile = ""
        xdsSiteMap.Data = CurrentMap.OuterXml
    End Sub
End Class
Here is the aspx of the master page
<td colspan="2">
    <div id="MainNav" class="MainNav">
        <asp:Menu ID="MainMenu" SkinID="MainMenu" runat="server"
            Orientation="Horizontal" DataSourceID="xdsSiteMap" StaticDisplayLevels="2">
            <DataBindings>
                <asp:MenuItemBinding DataMember="siteMapNode" NavigateUrlField="url"
                    TextField="title" />
            </DataBindings>
        </asp:Menu>
        <asp:XmlDataSource ID="xdsSiteMap" runat="server" DataFile="~\App_Data\SiteMap.xml"  XPath="siteMap/siteMapNode"></asp:XmlDataSource>
    </div>
</td>
Any ideas?
Thanks a million
AnswerRe: XMLDataSource.Data not binding right Pin
ToddHileHoffer5-Feb-09 2:35
ToddHileHoffer5-Feb-09 2:35 
GeneralRe: XMLDataSource.Data not binding right Pin
Yisman27-Feb-09 22:44
Yisman27-Feb-09 22:44 
GeneralRe: XMLDataSource.Data not binding right Pin
ToddHileHoffer8-Feb-09 5:16
ToddHileHoffer8-Feb-09 5:16 
AnswerRe: XMLDataSource.Data not binding right Pin
Yisman212-Feb-09 2:35
Yisman212-Feb-09 2:35 
GeneralRe: XMLDataSource.Data not binding right Pin
Jim_Gray15-Jun-10 10:04
Jim_Gray15-Jun-10 10:04 
GeneralRe: XMLDataSource.Data not binding right Pin
Yisman229-Jun-10 20:45
Yisman229-Jun-10 20:45 
AnswerRe: XMLDataSource.Data not binding right Pin
SumitMe19-Apr-10 4:10
SumitMe19-Apr-10 4:10 
Questionwebsite hosting Pin
kushalrshah5-Feb-09 1:48
kushalrshah5-Feb-09 1:48 
AnswerRe: website hosting Pin
ToddHileHoffer5-Feb-09 2:36
ToddHileHoffer5-Feb-09 2:36 
GeneralRe: website hosting Pin
kushalrshah5-Feb-09 2:42
kushalrshah5-Feb-09 2:42 
GeneralRe: website hosting Pin
ToddHileHoffer5-Feb-09 2:53
ToddHileHoffer5-Feb-09 2:53 
QuestionData inserted once again after Refreshing the browser Pin
ashok@techxygen5-Feb-09 1:31
ashok@techxygen5-Feb-09 1:31 
AnswerRe: Data inserted once again after Refreshing the browser Pin
kushalrshah5-Feb-09 2:00
kushalrshah5-Feb-09 2:00 
AnswerRe: Data inserted once again after Refreshing the browser Pin
Anish Gopi5-Feb-09 3:12
sitebuilderAnish Gopi5-Feb-09 3:12 
AnswerRe: Data inserted once again after Refreshing the browser Pin
Ranjit Viswakumar5-Feb-09 17:00
Ranjit Viswakumar5-Feb-09 17:00 
Questioncan anyone tell me the error in this coding,,, i want only one radio button to be selected instead of many at one click?? can u tellme why its not working?? Pin
ROHINIKOUNDINYA5-Feb-09 1:30
ROHINIKOUNDINYA5-Feb-09 1:30 
AnswerRe: can anyone tell me the error in this coding,,, i want only one radio button to be selected instead of many at one click?? can u tellme why its not working?? Pin
BalasubramanianK5-Feb-09 2:15
BalasubramanianK5-Feb-09 2:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.