|
Basically, all your pages should derive from a base page which checks if the user is logged in, and, if not, redirects to the login page.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
try this:
on login page:
protected void Page_Load(object sender, EventArgs e)
{
.........
//if the user is valid
Session.Add("user", user);
.......
}
on other page
protected void Page_Load(object sender, EventArgs e)
{
.......
if (Session["user"]==null)
Response.Redirect("login.aspx");
........
}
on logout
Session.Remove("user");
I hope that will help you.
|
|
|
|
|
clear the session on log out
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
Hi when i parse this query i ma getting sucesfull command...,
When i run the query gtting error like "Syntax error converting character string to smalldatetime data type"...,
Thsi is my procedure:
declare
@mthinc as tinyint,
@years as smallint,
@mth as varchar(50),
@yr as varchar(50)
set @mthinc=6
set @mth='@mthinc'
set @years=2007
set @yr='@years'
begin
select empid,max(edate) as edate from tblsalarydetails
where edate < @mth + '/01/' + @yr group by empid
end
I think to assign the tinyint & smallint value to varchar variable place i am getting error...,
How to solve that...,
Plz hlp me...,
Regards,
Magi
|
|
|
|
|
What does this following logic mean?
set @mth='@mthinc' & set @yr='@years'
Why r u assigning '@mthinc' to @mth variable?
Straightway assign the numeric value to @mth & @yr variable
Eg: @mth = '6' & @yr = '2007'
Make @mth & @yr variable as varchar
Regards,
Vipul Mehta
Sr. Software Engineer
Accenture Services Pvt Ltd
|
|
|
|
|
ya it will work...,
Thank u...,
Keep in touch,
Regards,
Magi
|
|
|
|
|
Is ur issue resolved?
Regards,
Vipul Mehta
Sr. Software Engineer
Accenture Services Pvt Ltd
|
|
|
|
|
Ya,
Thank u,
Regards,
Magi
|
|
|
|
|
I am using Infragistics and in my application i want to implement Ultraweb grid.
The problem i am currently facing is ..when i click a row in Ultra web grid i
want to populate all the values of the cells to the appropriate textboxes
given above it...
I am trying to do it since one week.. as i am new to Infragistics i need help...
Someone over there please help me...
Thanks in advance....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
I've never used Infrigistics controls. Their site is the best place to talk to people who have.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi every body,
I just want to create a folder and i have to place any files (like excel,word documents) in that folder.
Can any body help me?
Nehru
|
|
|
|
|
Go to the Solution Explorer and right Click the Project ....
U can see New Folder option there....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
just try right click u'r project in solution explorer choose add new folder..than place u'r file in that folder
its that what u want? or i'm missing your question?
Regards,
Tomi
|
|
|
|
|
i want to create a folder in my asp.net page.
please help me...
i am the beginner
Nehru
|
|
|
|
|
not getting ur question....?
u mean in the page when u click a button or so u wanna create new folder in a specified location , is that ur need...?
be more specific....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
|
Nehrubabu wrote: i want to create a folder in my asp.net page.
I'm sorry Nehru..i dont undertand what u'r meaning?
pls do more specific..we will help u
Kind Regards,
Tomi
|
|
|
|
|
It's the blind leading the blind around here....
Do you want to create folders on the server, or the client ? Where do the Word/Excel/etc files come from ? Your web page does not have permission to create folders on the client. If you create them on the server, the client cannot see them, unless you come up with a way of representing them in your web page. If you want to upload files, .NET has a control for that. IF you want to download them, then your page definately cannot fill a folder with files without some sort of download prompt.
You need to explain yourself better, what's on te server, what's on the client, and what do you want to do ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Nehrubabu wrote: I just want to create a folder and i have to place any files (like excel,word documents) in that folder.
Can any body help me?
Creating folder using code ? Then try Directory.CreateDirectory() .
|
|
|
|
|
Assuming he wants to create them on the server, then yes. But, I doubt it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: But, I doubt it.
Me also. But what to do since question is not clear.
|
|
|
|
|
Ask questions to make it clear ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Nehrubabu
if u want to crate a folder at run time
use this code
If Not Directory.Exists(Server.MapPath(Request.ApplicationPath) & "/foldername") Then
Directory.CreateDirectory(Server.MapPath(Request.ApplicationPath) & "/foldername")
End If
finalstring = FormatReportString()
srw = File.CreateText(Server.MapPath(Request.ApplicationPath) & "/foldername/" & fileName)
srw.Write(finalstring)
srw.Close()
Response.Redirect("../../../foldername/" & fileName)
|
|
|
|
|
Hi all,
This is Jats.
I have a requirement in my project where i have to host videos to net from a server.
Some thing similar to Youtube.
Select a particular video and view it.
I have no idea of where to start, can any body assist me in it.
As it is for a company use i cant use and external softwares(Freewares are ok).
Please help.......
Thank you.......
Jats
|
|
|
|
|
Hi,
I am using VB.NET 1.1.
I have the following in my ASPX page:
<asp:RadioButtonList ID="rblSearch" Runat="server">
<asp:ListItem Value="ISBN">ISBN</asp:ListItem>
<asp:ListItem Value="Title">Title</asp:ListItem>
<asp:ListItem Value="Author">Author</asp:ListItem>
<asp:ListItem Value="Keyword">Keyword</asp:ListItem>
</asp:RadioButtonList>
I have a querystring value called ISBN, anf it will look something like this:
http://localhost/MySite/Search.aspx?ISBN=True or
http://localhost/MySite/Search.aspx?ISBN=False
I need to go and select the list item if it is true, I'm not sure how to set it:
If Request.Params("ISBN") <> Nothing Then
' Set it here
End If
Please can someone help me??
Regards
ma se
|
|
|
|