|
Member 3879881 wrote: See i have a date format already in a string, in this format(dd/mm/yyyy);
so my string have a value like this 21/02/2008
I will suggest you to retrieve the required String format here itself . rather than taking it some other format.
Member 3879881 wrote: Now i have to change the string as mm/dd/yyyy (i.e: 02/21/2008)
if u have any idea plz share with me
use Split
|
|
|
|
|
yourdatevariable.ToString("mm/dd/yyyy");
umerumerumer
|
|
|
|
|
mr_muskurahat wrote: yourdatevariable.ToString("mm/dd/yyyy");
If you are using DateTime:
mm is minutes
MM is Month
yourdatevariable.ToString("MM/dd/yyyy");
|
|
|
|
|
I have created a link button as signout.
On click of liink button i have done following coding
FormsAuthentication.SignOut();
Response.Redirect("Login1.aspx");
This works only if i try to access any page by typing in url.
but if i click on back button it permits me to visit the page..
Might be my cookies are interfering with this as i have used persistant cookie on the login page..
Please suggest a soln to this
scotchy
|
|
|
|
|
Hi scotchy
The page is probably being cached.
To turn off caching for the page, use this code:
Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")
Regards
Rajeesh MP
|
|
|
|
|
Thx Rajeesh for the soln..
I dont know whether this is correct or not..
I have inserted the code in MasterPage and working for me..
just want to know whether things can be made at the Global.asax
Regards
scotchy
modified on Tuesday, January 13, 2009 1:18 AM
|
|
|
|
|
hi scotchy
ha ha ha..GREAT
|
|
|
|
|
I have a project to do its a 3 tier project which uses .net and java and its a registration system for students!!!!!!!!! can someone help me please i am even willing to pay i need this project finished for school ill give more information email me at cmpfwssp10@gmail.com please
|
|
|
|
|
Leona T wrote: i am even willing to pay i need this project
goto to rentacoder.com .
|
|
|
|
|
hi all,
i have requirement to find previous date
my input will be month and year,
for eg: 01/2009, it should return the month and year exactly six months back
i.e 07/2008,
how to solve this,
winnie
|
|
|
|
|
Just create datetime types in .net with your current dates
and then use AddMonth with -6 parameter!
try it,just two line of code
Human knowledge belongs to the world
|
|
|
|
|
|
Should have made him work for it, its too simple of a question
only two letters away from being an asset
|
|
|
|
|
Learning to RTFM[^] can AddMonths to your career but AddMonths could be negative as well
only two letters away from being an asset
|
|
|
|
|
Hi all,
some of my files are corupted(damaged) in XP.can any one tell me how to repair it or recover it ???
Thanks in advance...
|
|
|
|
|
|
sarangkhandare wrote: some of my files are corupted(damaged) in XP.can any one tell me how to repair it or recover it ???
How does it related with ASP.NET ? You are in a wrong forum !!
|
|
|
|
|
Why don't you repair you installation?
Cheers!!
Brij
|
|
|
|
|
My config:
VS 2005 Pro with SP1
C# 2005
.NET Framework 2.0 SP2
Vista Ultimate SP1 all current patches applied
P4 3.0ghz w/ 1.5GB RAM and (1) 300GB disk w/ 27.5GB free (system/boot disk), (1) 400GB disk w/ 74GB free
Problem: no matter how simple an app I create, debugging does not work - i.e. I can set a breakpoint that I know is crossed but the app does not fall into the debugger. These are .NET web apps. I created one with a single form and created several breakpoints, one in Page_Load against a simple string which I programmatically set a value for and one in an asp:validator that I know is hit and passed.
VS even asks to set the app for debugging, and IE is set to show scripts, etc.
Can someone help me to understand what I'm missing and why I can't debug anything simple or complex? You can probably imagine this is making me crazy and I'm having to write data to textboxes just to see what's happening when something goes wrong. Some things I just can't test for at all because of this.
Thanks in advance!
|
|
|
|
|
Hi Mike..
<%@ Page Language="VB" MasterPageFile="~/........"
AutoEventWireup="true" CodeFile=".....aspx.vb" Inherits="......" title="....." %>
Change autoeventwireup to TRUE and try....
Regards
Rajeesh MP
|
|
|
|
|
Unfortunately, all pages have AutoEventWireup="true", here's a sample of a simple app page:
<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ValidaTest._Default" %>]]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Pick a Team Name</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2>Pick a name for your team</h2>
Name:
<asp:textbox id="txtTeam" runat="server" xmlns:asp="#unknown" />
<asp:button id="btnValidate" runat="server" text="Go" xmlns:asp="#unknown" />
<br />
<asp:requiredfieldvalidator id="reqval_txtTeam" runat="server" xmlns:asp="#unknown">
ErrorMessage="You must enter a team name."
ControlToValidate="txtTeam" Display="dynamic" />
<asp:customvalidator id="custval_txtTeam" runat="server">
ErrorMessage="That name is already taken. Please pick another."
ControlToValidate="txtTeam" Display="dynamic"
OnServerValidate="custval_txtTeam_ServerValidate" />
<asp:label id="lblResult" runat="server" enableviewstate="false" />
</asp:customvalidator></asp:requiredfieldvalidator></div>
</form>
</body>
</html>
Thanks for trying - it seems to be something deeper. When I press f5, everything executes, just no stopping at breakpoints. The Build is set to Debug as the active, DEBUG and TRACE constants are defined, it's set to full debug mode, any CPU and platform and the ASP.NET debugger is checked.....
Strangest thing.....
|
|
|
|
|
i had same problem, it solved by when i start dotnet framework by right click and run as administrator on VS sort cut or on programs.
you may try this.
Anshuman Singh
|
|
|
|
|
Thanks - that was the answer - for whatever reason, even though my Vista ID is an Administrator, I have to explicitly start VS by running as an Admin by right-clicking. Thanks for fixing me up!
|
|
|
|
|
hi Anshuman..
thatz a good one..Thanks for the information
Regards
Rajeesh MP
|
|
|
|
|
<br />
<br />
CS1502: The best overloaded method match for 'System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(string, string)' has some invalid arguments<br />
<br />
Source Error:<br />
<br />
<br />
<br />
Line 27: <br />
Line 28: objLogin = new STR_USERS(); <br />
Line 29: objLogin.PASSWORD_PRO = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword, "MD5"); <br />
Line 30: objLogin.USERNAME_PRO = FormsAuthentication.HashPasswordForStoringInConfigFile(txtUserName,"MD5");<br />
Line 31: <br />
I don't why I got this error.
|
|
|
|