|
No, this base class is use for some business logic inherit to my Page Partial class and i want to use it to access my DIV control which is server side control on that form.
Sasmi
|
|
|
|
|
Hi,
I know this query is not related with ASP.NET but didn't find suitable forum to post this valid web situation.
I want to know how can we prevent multiple login in ASP site using same userid and password?
Design suggestion are most welcome !!!
Thanks,
|
|
|
|
|
Jaiprakash M Bankolli wrote: I want to know how can we prevent multiple login in ASP site using same userid and password?
Using databases . When User login into your application , check is there any entry in the database with that user name or not. If not, make an entry and enter into the application. If yes, message that some one has already logged in into the application it the same credentials.
Check it on Login
if(UserIsInApplication(UserID))
{
Alert("Already Logged in with the same credentials..."
}
else
{
MakeDBEntry(UserID);
LoginApplicatin(UserID);
}
Note :
You have to implement all those methods, I have given just for your understanding
Remove the DataEntry from database when user log off Application , other wise user never be logged into the application .
Here is another Tricks , What happend , If user close the browser instead of Click on "Logoff"
[Added]
Jaiprakash M Bankolli wrote: know this query is not related with ASP.NET
Apologies. I didn't read this section . Extremely sorry.
[/Added]
cheers,
Abhijit
|
|
|
|
|
I had same design in mind but had stuck with the point that you have mentioned "What will happen , If user close the browser instead of Click on "Logoff"...
So if you have some more idea in mind let me know ...
Thanks anyways !!
|
|
|
|
|
Jaiprakash M Bankolli wrote:
So if you have some more idea in mind let me know
I had made a javascript function , that will call on the page unload if and only if , the user close the Browser ([X]), Alt+F4 and From Task Manager.
on that function , I have open a popup ( Location will not be visible to user means top=10000, left =200000 like that ) and from there I have callled the server side code to clear database .
What about yours ?
cheers,
Abhijit
|
|
|
|
|
That sounds good idea.. Let me try that, how did you trap browser close From Task Manager.
|
|
|
|
|
just try this ant let me know
function DeleteUserLog()
{
if(window.event.clientX < 0 && window.event.clientY <0)
{
window.open("Removelogs.aspx", "OpenWindow_Close_Session",'left=12000,top=1200,width=10,height=1');
}
}
cheers,
Abhijit
|
|
|
|
|
Dear All,
I have a user control inside a page which is used to login.
Also the page has a search option.
When the "Login" option is clicked the login window will be opened using the popup control extender (AJAX Control).
When the popup is opened then the default button for the page should be the "Submit" button in the login window which is in the user control.
If the Login window is not opened then the "Search" button has to act as the default button and while clicking on enter key it has to call the search function.
I have coded as the following to set the "Submit" button as the default button in the user control on page load of the user control.
Page.Form.DefaultButton = this.FindControl("imgbtnSubmit").UniqueID;
Can any one tell me how to get rid of this issue?
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
i want to get the distribution list and group ids in a list box. i have been sucessful to get filter in first name and last name through Directory searcher class.
mySearcher.Filter = "(&(objectClass=user)(|sn=" + txtLastName.Text.Trim().ToString() + "*)(givenname=" + txtFirstName.Text.Trim().ToString() + "*))";
// mySearcher.Filter ="(&(objectClass=group)(|(sn=" + txtLastName.Text.Trim().ToString() + ")))";
results = mySearcher.FindAll();
foreach (SearchResult result in results)
{
LstEmailAddress.Items.Add(Convert.ToString(result.Properties["displayName"][0]));
lstMemberGroups.Items.Add(Convert.ToString(result.Properties["memberof"][0]));
}
|
|
|
|
|
First of all this is nothing related with asp.net . This is simple C# code.
Please Read This[^]
cheers,
Abhijit
|
|
|
|
|
Hi,
I am working on a datalist control in which in which I have two server controls. One is Image Button and another is Hyperlink.
On running, an image and a text is coming in datalist.
Now I want that text in a variable.
Actually I am using:
protected void Image_Click(object sender, EventArgs e)
{
get_name();
string nam = (string)ViewState["Testnam"];
Response.Redirect("SubCategory.aspx?name="+nam);
}
public void get_name()
{
nam = DataList1.SelectedItem.DataItem.ToString();
ViewState["Testnam"] = nam;
}
Image _Click is the onclick event in image button in datalist.
How can I retrieve the text of that hyperlink.
Please assist me.Thanks in advance.
Cheers,
Nripendra
|
|
|
|
|
Hi There,
I have a problem.I am giving option to user to change the theme of web page.
and what I want to do is that I want to retrieve color of theme when user select that theme.Can anybody tell me.I am using Asp.Net 2.0 and C#.Net.
Thanks,
|
|
|
|
|
ArifShaikh wrote: what I want to do is that I want to retrieve color of theme when user select that theme
User should select Theme from any control. Means they can select by clicking a link , or from dropdown. Now if they selecting from dropdown , then you should no the value that what user selecting , based on that you can change the theme.
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
I had succeeded in changing theme.My problem is that I want to retrieve main color of theme.
Thanks.
|
|
|
|
|
ArifShaikh wrote: y problem is that I want to retrieve main color of theme
From where User selecting the Theme color ?
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
He is not selecting color he is just selecting theme from DropDown list box.But Actually I am showing my all error messages in div tag using javascript.When error comes it popup message in that div tag.I want to apply same theme to that Div tag.I am not able to do this thats why I was asking for retrieving color.So that after retrieving color I could pass it to my javascript function.If you know how apply theme to div tag then please tell me.
Thanks.
|
|
|
|
|
No... You are running on Wrong Direction !! You do not need to pickup the color. I believe for every theme name , you are having the Theme, and You are Changing the Theme. I am just giving you one suggestion , that Try to use HttpHandler , which will apply the theme to all of your pages, including popup at runtime. Do not need to pick the color and applying it.
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
Can you tell where to find information to use HttpHandler to apply the theme to all of pages including popup.
|
|
|
|
|
Here It is[^]
Use session to store Theme Name, and Apply Change using HttpHandler .
Check This Two methods
context.Session.Add()<br />
context.Response.Redirect()
Now, Its on you to implement it. If I give you complete code, that does not help you to learn .
cheers,
Abhijit
|
|
|
|
|
I have a dropdown in UpdatePanel, while clikcing a particular field in the dropdown , some fileds should not be visible and these fields are in a seperate table, and this table has its own id, but while clicking a field in the dropdown the table is not disappearing, but if i remove the updatepanel of the dropdown its working properly,
Any Solution,
Plz help................
|
|
|
|
|
chinnumol wrote: while clikcing a particular field in the dropdown , some fileds should not be visible and these fields are in a seperate table, and this table has its own id,
You want to mean that when you select some value from dropdown list, based on that you want filed should be visible true or false. if yes,'
As you said, you have placed Dropdown list inside updatepanel , Did you place Those filed inside the updatepanel or not ? if no , then place then also . Because, when you change the content of Dropdownlist, then only it postback, not the other control of that page. Or even you can use multiple updatepanel and you need to change the updatemode="Conditional" and Explicitly update them when required.
chinnumol wrote: but if i remove the updatepanel of the dropdown its working properly,
Yes, The reason I have already discuss !!
cheers,
Abhijit
|
|
|
|
|
hi abhi,
I tried that also, I put the second table inside the update panel, while clicking a particular field in dropdown the fields in the second table should not display, I gave an id for the second table inside the update panel,
but not working, i put the code in the dropdown's selected index changed, if i remove both the update panel its working, I also tried the updatemode ="conditional"
wht to do?
|
|
|
|
|
If that table is present outside update panel then you have to put that table in another update panel.
|
|
|
|
|
Basically I have a main form and then child forms that are activities of the main form. What I want to do is instead of popping the child forms into new windows I would really like to do a modal DHTML popup as part of the original form... anyone know an easy way of doing this or something similar? Thanks
|
|
|
|
|
cwhittl wrote: would really like to do a modal DHTML popup as part of the original form... anyone know an easy way of doing this or something similar?
This[^] should make it easier if you can use AJAX toolkit.
|
|
|
|