.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

LoginStatus is not updated

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
I have FormsAuthentication in place like this in web.config file: <authentication mode="Forms"><forms name="Login" loginUrl="/WebPages/Default.aspx?Action=Login" defaultUrl="/WebPages/Default.aspx?Action=Login" protection="All" path="/WebPages/" /></authentication> <authorization>allow users="?" />authorization> I have a LoginStatus control in the mainpage, which shows 'Login'  to startwith.  When I click on that, it will redirect me to the login page.   After logging in successfully, I go back to the main page.  But the LoginText of LoginStatus control is not updated..i.e., it still shows 'Login'.  When I click on the LoginStatus again for the second time, then it is updated to 'Logout' and I go to the Login page. The LoginStatus control is defined like this: <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect" LogoutPageUrl="~/WebPages/Default.aspx" /> What should I do to get the LoginStatus to show correct text first time itself??

View Complete Post

More Related Resource Links

Toolbox: Updated grid controls, open-source comparison tools, and more


This time: Windows Forms grids, professional-looking date textboxes, file merging, and more.

Scott Mitchell

MSDN Magazine November 2007

SQLXML 3.0: Build Data-Driven Web Services with Updated XML Support for SQL Server 2000


XML is becoming the ubiquitous data format on the Web, and XML support in SQL Server is evolving to meet the additional demand. Using XML, SOAP, HTTP, and SQL Server, you can now build powerful Web Services easily. To show just how simple it is with SQLXML 3.0, this article walks the reader through the process step by step, from setting up a virtual directory enabling data access via HTTP to executing queries and building Web Services. Finally, the author illustrates the creation of two Web Services clients-one with C# that works with the Microsoft .NET Framework and one with the SOAP Toolkit 2.0 for anyone still using earlier development tools.

Christian Thilmany

MSDN Magazine May 2002

how to refresh image updated with AsyncFileUpload


I've created an AsyncFileUpload device that uploads an image in ListView but it doesn't refresh on the page until the page is manually refreshed. Any ideas on how to accomplish this? This is the applicable code:

In ListView control:

<asp:UpdatePanel ID="udpPhoto" runat="server">
        <span style="text-align: center; vertical-align: middle; font-size: 7pt;">
            <br />
            <asp:Button ID="btnEPhoto" Font-Bold="False" TabIndex="160" Text="Upload/Change Photo"
                UseSubmitBehavior="False" OnClick="btnPhoto_Click" runat="server" />
            <br />
            <asp:Label ID="lblEPhoto" runat="server" Font-Bold="True" Text="Uploaded Photo:" />
            <br />
            <asp:HyperLink ID="lnkEPhoto" runat="server" BorderWidth="2px" NavigateUrl='<%# Eval("Photo_Recent") %>'
                <asp:Image runat="server" ImageUrl='<%# Eval("Photo_Recent") %>' Height="50px" ID="imgEPhoto">

KPI for updated values


I would like to show a value in a KPI and I wonder if there's a way to have a list or something simple where ONE value can be inputted and possibly overwritten (using versioning for history) and that value is updated so the KPI indicates the updated value.  Normally this value will be updated daily.

I checked out Last list value as KPI and it says that it can't be done.  I don't know if anyone has any suggestions or recommendations for this.  I know that they want a history of this and they are currently referencing it in an excel spreadsheet that is linking and the Excel Services is running but seems to be having trouble.


The Values today are: 8

The above information would be updated daily and there only needs to be ONE value put in to do that update.  Is there something I could do out of the box (I don't do programming, but I do have SharePoint Designer).  For me, if a user inputs the value in a custom list, how do I have the KPI reference the LAST item, instead of a sum or max, or min.?  Is there a way to have only ONE item in the list that overwrites the other, without having to edit it?  I know views show that, if you

Workflow doesn't complete when a task is updated directly from an infopath form.

I have an approval workflow that creates a task for a group to approve or reject an InfoPath form. But if a member of the group opens the form and updates the task from there, it doesn't complete the workflow. It only completes the workflow if they go to the actual task and update it from there. Does anyone know how to fix that?

Will SQL Server Compact feature an updated and more capable OLEDB driver

Hi, Earlier, we found problems with using SQL CE 3.5 via OLEDB. While some limited functionality was available and data can be accessed via commands and recordset via OLEDB/ADO from, say, Excel or Access, we were unable to access SQL CE directly from other data-driven packages that nominally support OLEDB, most importantly SAS and SPSS. So our question is whether SQL Server Compact will feature an updated and more capable OLEDB driver? Thx and regards, Ralph

The model of type could not be updated viewModel

Hello,  Ok i am pritty sure this is because I dont know how to handle sending back my viewmodel on edit:Error I am dealing with:here is my [HttpGet] public ActionResult Edit(int id) { ItemEditViewModel ItemEditVM = new ItemEditViewModel(); ItemEditVM.product = storedb.Products.Single(a => a.Product_Key == id); TempData["Error"] = ""; return View(ItemEditVM); } Form is nothing specials standard strongly typed using the view model [HttpPost] public ActionResult Edit(int id, FormCollection collection) { var product = storedb.Products.Single(a => a.Product_Key == id); try { UpdateModel(product, "product"); <--- Errors Here storedb.SaveChanges();//myview model i am usingpublic class ItemEditViewModel    {        public Product product {get; set;}    } Thanks  

asp:LoginStatus with url rewrite - postback url

hi ! I have done a url rewrite in my website and I did the following for handling the postbacks;    protected void Page_Load(object sender, EventArgs e)     {         this.form1.Action = Request.RawUrl;    protected void Page_Load(object sender, EventArgs e)    {        this.form1.Action = Request.RawUrl;it worked. but no with loginstatus button?? anyone knows why??

Cube Refreshment with Data updated in Table

HI All, I have cube which is MOLAP,and i have created SSIS package to process the cube,now i want to start the job as soon as data got uploaded into the Relational database. Please guide me in this as i am new to ssas. Regards Shraddha

how to get the css property updated along with update panel

I am using a update panel in my webpage. I am having a treeview in it . The css property of the Treeview before updating is different from after. Hw is it hapeening pls help i want to chagne it to the same css propertty as before its urgent 

Site variations Releative url is not updated in other language sites

  I have a site called “en-us” and I need to create 3+ variations of it for different countries. When I create the variation all relative links with in the content stay the same. For example /en-us/Products/.. does not change to: en-CH/products/… it stays the same. I was under the impression that variations would automatically update all relative links and URL’s within the site. Is that true? is there any other way to update the relative url. please let me know Any help and response would be greatly appreciated. muthu

SSIS 2008 generates Registration information for this application needs to be updated - VSTA.exe

I am getting the following error in SQL Server 2008 R2 (build 10.50.1734) x86 platform BI Development Studio (BIDS) 9.0.30729.4462 with .NET Framework 3.5 SP1 in a Integration Services project. I have a package with a Data Flow task that contains a Script Component. I edit it and attempt to edit script and I get the following error: Registration information for this application needs to be updated. To update, log on as an administrator and run this command: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTA.exe /HostID SSIS_ScriptComponent /setup About a minute later, another box displays with the following message Cannot show Visual Studio Tools for Applications editor. Additional information: The VSTA designer failed to load. “System.Runtime.InteropServices.COMExeption (0x80004005) Error HRESULT E_FAIL has been returned from a call to a COM component at VSTADTAProvider.Interop.VSTADTEProiderClass.GetDTE(String bysHostID, Uint32 dwTimeout). I execute the command above running as an administrator (there are no output results). BIDS displays the same symptoms. This happens on a Windows 7 Enterprise (I said Professional in an earlier but un-related post) workstation x86 platform. I get the error even if I create a new script component in a new data flow task in a new package. I also have VS 2010 Premium Edition (build 10.0.30319.1 RTMRel) i

Validation error: This property can not be set to a null value [updated with test case!]

Hi, In a dynamic data web application, I get a validation error on a non-null nvarchar(50) column in ListDetails.aspx, even though I have entered a value which should be accepted. The validation error is: "This property cannot be set to a null value.". I can not reproduce this on northwind/adventureworks. Any ideas? UPDATE: I have created a complete test case: http://printf.no/DynamicDataBugTest.zip (The archive was scanned with the latest AVG definitions before uploading to my private secure dedicated FreeBSD server) The test case contains: One Dynamic Data Web App project One MS SQL Server 2005 database backup which contains a single table with three columns One screenshot showing how the error manifests itself I am fairly convinced now that this is a reproducible DD bug. -Andreas

OOTB Approval Workflow - Approval status could not be updated

I've setup up a standard OOTB (out of the box) approval workflow on a Pages library, in order to manage the approval of all pages created and updated.  This operates as expected, and the users are mostly happy, execpt for one scenario: Once a page has been submitted for approval, if the approver wants to edit the page, it stops the workflow (after prompting) which then requires the workflow to be started again.  They would like it so the approver can edit and then approve, without restarting the whole workflow process. There is a setting in the approval workflow configuration of the 'Complete the Workflow' section in the 'Cancel this Workflow when the' area, and by unchecking the 'Document is changed' option, I believe this should enable approvers to edit the page and then approve the page, without stopping the workflow  However, the workflow appears to operate as expected, except the page does not automatically get approved.  By looking in the workflow history, I can see the following error: Post-completion activity performed. Approval status could not be updated. I've tried this on two separate MOSS 2007 Enterprise farms, both are publishing sites and I'm running as a site collection administrator, both with the same results. Is anyone else getting this, is this normal?! Is there another way to approach this, without having to go

Data That is continually updated

Hi,I was asked this question in an interview and wasn't exactly sure how you would implement it. I was given a brief overview of the situation. multiple wpf applications that connect ot a wcf service and a wcf service that connects to a db.The told me the data in thew db is continually changing (and not by the WPF apps). So they asked me how I would keep the wpf apps provided with the latest data. So I am assuming there is another app e.g. windows service that is continually polling the data?Its basically I guess very similar in style to a trading application.Any thoughts would be most welcome. Thanks.

Warning1:There are updated custom wrappers available for the following referenced components: Micros

Hi, I have a form application that it calls Excel form in it. The form works with no problem in XP (32bit OS). I have one 64bit machine that Windows7 is installed on it. When I run the same project in this one, using Visual C#, it issues a warning like: Warning 1 There are updated custom wrappers available for the following referenced components: Microsoft.Office.Core ,Microsoft.Office.Interop.Excel ,VBIDE.  It builds the code fine (ofcourse with the above warning) but it crashes during compilation time. There is no other warning or error. Just simply won't compile. The Office installed is Pro 2007 and is installed fully on this machine the same as the XP machine. It would be appreciate if someone could help me figure out what can be wrong and how I can fix it. Thank you very much. Red      

Select updated record after edit

Hello!On one (aspx) page I have a GridView (GridView has multiple pages). After a user selects a row/record and clicks "edit" he's redirected to another (.aspx) page where he edits the selected record via DetailsView. After clicking update on DetailsView he's redirected back to the page containing the GridView.What is the simplest/shortest way that the updated record is automatically selected on the Gridview (e.g. at Page_Load event)?Thx in advance!M
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend