|
Am using asp.net login controls for my page. Is it possible to find the user who closes the page without logout?
|
|
|
|
|
Member 4755319 wrote: Is it possible to find the user who closes the page without logout?
I don't think that. Because server won't get any notifications when a client browser closes. You can try hooking a JS script to the window close event which gives AJAX request to server and informing it about the event.
|
|
|
|
|
my commerce starter kit is locally running. but when i host that starter kit means it display an error "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. so how to i rectify this problem... i change all the permission in my starter kit. but it doesnot run. please help to solve it
|
|
|
|
|
what happens if you try to add aspnet account and give this account the full rights.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Hi all,
I am trying to convert a string to a formated date value.The format is "dd-mm-yyyy" I am trying this one
date.Parse(dt).ToString("dd-mm-yyyy")
If I supplie the value as 12/26/2007, it is ouputing the value as "26-00-07". What I am wrong here
Thanks in advance
Dana
|
|
|
|
|
Use "MM" instead of "mm". Capital "M" denotes month whereas small "m" denotes the minute.
|
|
|
|
|
Thank You Venaktesh
|
|
|
|
|
You are welcome.
But my name is "Venkatesh" not Venaktesh
|
|
|
|
|
hello frnds,
how can i check the "Every Visit To The Page". using the .Net
manually i do it by,
Internet Explorer ..> Tools ..> Internet Options..> Settings...>Every Visit to the page
thankx and regards
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi!
I am trying to display alert from code behind.
below are my code description.
Dim strScript As String
strScript = "<script>"
strScript = strScript & "alert('please select a value');"
strScript = strScript & "</script>"
Page.ClientScript.RegisterStartupScript(Me.GetType, "ClientScript", strScript.ToString())
the alert gets displayed fine but everything in the main page disappears. could someone please help me .
thanks
|
|
|
|
|
Hi,
If you want to show alert messages on button click then in pageload event write
button1.attributes.add("onclick","return showalert()");
and in the aspx page write a javascript function to get the alert messages.
Reply me if it doesn't work for you.
Bhanu
|
|
|
|
|
the link button i have is in the datalist. so when i write above it doesn't fires in first click but it does fires if i click second time. below are my codes.
Private Sub dlParent_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles dlParent.ItemCommand
If e.CommandName = "select" Then
Session("MenuId") = e.CommandArgument.ToString
End If
Dim menuHead As LinkButton = CType(e.Item.FindControl("lnkParent"), LinkButton)
If menuHead.Text = "Property View" Then
If Session("locationid") <> Nothing Then
Response.Redirect("PropertyDetail.aspx")
Else
menuHead.attributes.add("onclick","return displayalert()");---this doesnt work in first click
End If
ElseIf menuHead.Text = "Portfolio View" Then
Response.Redirect("PortfolioCapex.aspx")
End If
End Sub
|
|
|
|
|
Hi,
I'm getting date from SQL table, where it is saved as 7/31/2007 12:00:00 AM
I need to show this date as July, 31 2007 without the time.
is there any easy way to do that?
thanks
|
|
|
|
|
Usually its safest to use the ISO date standard, so yyyy-MM-dd. In your case, that would be 2007-31-07 and I'm pretty sure the 7 has to be preceded by a 0 for it to work properly, let alone for any single-digit number in the date.
www.socoder.net
|
|
|
|
|
Thanks for reply,
but I didn't get you.
I'm getting the date as it is and I need to display it on a label in a readable format, i.g., as Oct, 27 2007
|
|
|
|
|
Hi,
you can check here[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hi
try this code
string a
a = your date from sqlserver
label.text = DateTime.Parse(a).ToLongDateString();
and let me know
Bhanu
|
|
|
|
|
yourDate.ToShortDateString()
use this . Hope this will also help you.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
HI,
I can't understand what is wrong here:
private const VirtualRoot = @"E:\asem\Visual Studio 2005\WebSites\SDP\users\"+Membership.GetUser().UserName.ToString();
it gives me Compiler Error Message: CS1001: Identifier expected
|
|
|
|
|
you left out the class identifier, i.e. private const string VirtualRoot instead of private const VirtualRoot
www.socoder.net
|
|
|
|
|
oh, yeah...
Thanks!!!
|
|
|
|
|
Hi,
I am getting arithmatic Over flow exception in .NET.
i.e Arithmetic overflow error for type money
But I want to write a convinent message for this:
catch(ArithmeticException)
{
-------
-------
}
catch (Exception ex)
{
-------
-------
}
but the exception enters in catch (Exception ex) not in catch(ArithmeticException)
any ideas. I am using C#.
Thanks in Advance
|
|
|
|
|
Look at the type of ex when it is thrown and then you will know the correct exception. Break points are your friend and can be much faster than documentation.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
What a mess......
Description: I have a large scale asp.net 1.1 application I'm trying to move to 2.0. I'm hoping to improve some aspects in the port. It's made up of many modules, separate web applicaton projects, different directories (not nested), and it's all connected via IIS. I can open, run, debug, etc. Works great. Design time support is very lacking.
VS 2008
I'm trying to build a new framework using 2.0. Now that 2.0 has the whole master pages feature built in I figure I'd dump the old 1.0 approach. So far I've got that working. But now the controls. Before I'd have ascx files (standalone, don't inherit from anything) and then my pages would reference user controls (by class, NOT ascx) that are not attached to any ascx. Based on settings, or if an override ascx file is found in another directory, this usercontrol would dynamically load the PROPER ascx file and add it to it's empty control collection. It would then look for the appropriate controls in that loaded control, and move data accordingly.
I've read about the asp.net 2.0 'themes and skins' but this doesn't seem to do what I want. This is more about just styles, colors, etc then actually allowing one to provide a whole new ascx file with a radical new layout. Or does it and I'm missing something?
I can make the old approach work in VS2008 with the same lack of any designer support.
One issue with building ascx controls with codebehind and referencing those ascx's directly from a page is that it's all broken as soon as you add these controls in a subweb. The path in the register tag doesn't work. Either you set the tag so it works in design time breaking the runtime or vice versa. You can have one but not the other. Because of this I have my ascx and cs disconnected. My pages reference the cs directly which is nice since no path is involved.
So, the big questions.
1) If I register an ascx directly in a page, how can I make it work in both design time and runtime? Designtime path is relative to the project. Runtime path needs to include the subdirectory that the sub web application project is in. Is there any way to make this work?
2) Is there anything NEW in asp.net 2.0 or VS2008 that will allow me to create a UserControl (ascx and codebehind cs) but then at runtime change which ascx to actually load? It would be nice to have the designtime integration of the ascx and cs working together. But then at runtime, maybe I want a different ascx? But I don't want to have to change all the register tags in all the pages that reference that. My current app ships with all the default ascx files but then if I want to change something, I can just make a new version of an existing ascx file, place it in a client override skins directory and my application loads that. Of course, the current app, the ascx and cs are disconnected.
|
|
|
|
|
Hi,
I have a converted rdlc file that uses 3 datasets, all of which takes the same two parameters being passed from the requesting page. But when I run it - I get "parameter 'Parameter1' is missing a value" error. FYI, I set default values for both of them.
Any ideas?
Thanks.
Ekjon
|
|
|
|