|
But my requirment to check multiple user should login same time , if yes then Acoount will be locked in Active Directory. when ever a new seesion created i have entred user id with session id in DB and remove it while logoff.
If user close the browser then Session_End doesn't get fired from Global.asx file.
but i have mad it now with out ajax. just open a popup on browser close and i have call the same method to delete log from data base and then the popup will close automatically.
cheers,
Abhijit
|
|
|
|
|
Abhijit Jana wrote: But my requirment to check multiple user should login same time
You want to prevent same user logging multiple times at same time right ? I'd put a DB flag which will be set when user logs in. When user logs in, this flag has to be checked and if it is in set state, prevent logging in. When user logs out reset this flag.
Keep a SQL job which runs in specified intervals and checks for these flags. It should reset flags which are set for long time (more than session timeout limit).
Abhijit Jana wrote: If user close the browser then Session_End doesn't get fired from Global.asx file.
It gets fired, but not immediately. Each session will have a timeout and when it reached timeout limit, session_end will be fired (only in "InProc" mode).
|
|
|
|
|
Hi,
I want to add serial number column in my data grid. It should be displayed according to the records. For instance, I'm showing 5 records in the data grid. Sl. No. should be from 1 to 5.
Sl.No. Name Desig
1 Bala SE
2 Ganesh SE
3 Rajesh SE
Is there any option in design level itself? Pls help. tnx in adv.
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: Is there any option in design level itself? Pls help. tnx in adv.
You can use Container.ItmeIndex in DatGrid
<asp:templatefield headertext="Sr.No" xmlns:asp="#unknown"><br />
<itemtemplate><br />
<%#Container.ItemIndex + 1 %><br />
</itemtemplate><br />
</asp:templatefield>
Regard
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Tnx. It is working fine.
Balasubramanian K.
|
|
|
|
|
I am using paging in my data grid. Serial number is re started in every page. Actually, I am expecting it should be continuied....
Balasubramanian K.
|
|
|
|
|
use following
]]>
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: use following
]]>
DataItemIndex is not supported in DataGrid.It is ItemIndex
please don't forget to vote on the post that helped you.
|
|
|
|
|
No...i am getting..it is not a member of data grid....
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: I am using paging in my data grid. Serial number is re started in every page. Actually, I am expecting it should be continuied....
try this tell me what result get you
<br />
<![CDATA[<%#Container.ItemIndex + 1 + DataGridID.CurrentPageIndex*DataGridID.PageSize %>]]>
please don't forget to vote on the post that helped you.
|
|
|
|
|
No...Mr.Imran
Previously, serial number was come. But now it is also not coming.
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: No...Mr.Imran
Previously, serial number was come. But now it is also not coming.
It is perfectly working in my case
<![CDATA[<%#Container.ItemIndex+1 + DataGridID.CurrentPageIndex*DataGridID.PageSize %>]]>
Have you set your DataGridID
or
Post your code
please don't forget to vote on the post that helped you.
|
|
|
|
|
Yah I have given Grid Id also
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: Yah I have given Grid Id also
Can you post your code?
please don't forget to vote on the post that helped you.
|
|
|
|
|
<asp:datagrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 24px" runat="server"
AllowPaging="True" AutoGenerateColumns="False" CellPadding="3" BackColor="White" BorderWidth="1px"
BorderStyle="None" BorderColor="#CCCCCC" CssClass="GrdRows">
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
<ItemStyle ForeColor="#000066"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#006699"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="srno" HeaderText="No"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Sr No.">
<ItemTemplate>
<![CDATA[<#Container.ItemIndex + 1 + DataGrid1.CurrentPageIndex*DataGrid1.PageSize %>]]>
</ItemTemplate>
</asp:TemplateColumn>
etc................
Balasubramanian K.
|
|
|
|
|
I have installed NUnit-2.4.7-net-1.1 in my system and trying to add the Nunit.Extensions.Asp and Nunit.Extensions.Asp.Tester to my namespace and reference in solution explorer(dll's not found under reference->.net tab) but unable to do it Can anyone figure it out and explain in detail.
Thanks in Advance!
|
|
|
|
|
Are you using VS .net 2003?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
no iam using VS .net 2005....
|
|
|
|
|
Then why you are
using NUnit-2.4.7-net-1.1, I think it is for .Net1.1
There is
NUnit-2.4.7-net-2.0, Available
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
I am trying to generate an ASP.NET Unit Test following step given in MSDN site, So i created a new website added a class file in the solution explorer,A Microsoft Visual Studio dialog box is displayed to ask about placing the new class in the App_Code folder and i clicked yes because it is said that one cannot generate tests from code in an .aspx file or in a folder other than the App_Code folder.
Then it is said Right-click the class in the class file, and then click Create Unit Tests.But when i right click nothing happens
for ref:http://msdn.microsoft.com/en-au/library/ms182526(vs.80).aspx[^]
modified on Wednesday, July 16, 2008 6:55 AM
|
|
|
|
|
I think that namespaces are coming with NUnitAsp[^]
Not with NUnit.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
The real problem :
I am trying to generate an ASP.NET Unit Test following step given in MSDN site, So i created a new website added a class file in the solution explorer,A Microsoft Visual Studio dialog box is displayed to ask about placing the new class in the App_Code folder and i clicked yes because it is said that one cannot generate tests from code in an .aspx file or in a folder other than the App_Code folder.
Then it is said Right-click the class in the class file, and then click Create Unit Tests.But when i right click nothing happens
for ref:http://msdn.microsoft.com/en-au/library/ms182526(vs.80).aspx[^]
modified on Thursday, July 17, 2008 7:09 AM
|
|
|
|
|
Hi,
In most of my forms, I have to show the data based upon the selection. Like Based upon the Drop down list selected value, I have to show the corresponding fields, Based upon radio button selection show remaining fileds...
I am thinking of Javascript to show/hide remaining fields based upon selections. What are the best options for these type of conditions? Is the Javascript is good? I have so many conditions like this.
Thanks in advance
|
|
|
|
|
Yeah, JS is good, but less reliable as it can be turned off at the users end. If same type of functionality is used in many places, I'd create a custom control which does the show/hide and will add options to configure the selection.
|
|
|
|
|
actually i have two file upload control at first page .
and i want to upload two image. at one button click .for this i have write a coda:
string filepath = "C:\\Uploads";
HttpFileCollection uploadedFiles = Request.Files;
for (int i = 0; i < uploadedFiles.Count; i++)
{
HttpPostedFile userPostedFile = uploadedFiles[i];
userPostedFile.SaveAs(filepath + "\\" +
System.IO.Path.GetFileName(userPostedFile.FileName));
}
but now i want to retrive the images at page third .so tell me .
what should i do.
thanks in advance .
gaurav
|
|
|
|