|
function doClick(buttonName,e)
{
//the purpose of this function is to allow the enter key to
//point to the correct button to click.
var key ;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
if (key == 13)
{
//Get the button the user wants to have clicked
var btn = document.getElementById(buttonName);
if (btn != null)
{ //If we find the button click it
btn.click();
event.keyCode = 0
}
}
}
txtEmail.Attributes.Add("onKeyPress", "doClick('" + lnkbtLogin.ClientID + "',event)");
txtPassword.Attributes.Add("onKeyPress", "doClick('" + lnkbtLogin.ClientID + "',event)");
in the master page i kept this coding on keypress enter to login
my problem is if i click on register page, if i want to login lying on the register page if i trying to enter emailid and password javascript error is firing for every single letter and if i continue and click on keypress it is firing for the register page and it is not logging in if i click on signin button it is working could you help me
Thanks & Regards,
Nath
|
|
|
|
|
suppose i have four hyper link in my page if user click on any hyper link then a file will be downloading in client machine. if user click on 4 links one after one then 4 file will be downloading in client machine. so i want that if user click first time on any link then a file will be downloading and if user click on second link when first file is downloading then i want to show a message to user that already one file is downloading from your IP and stop second file download. when first file download will be completed if then user click on second or any other link then another file will download in client pc. when file is downloading in client pc then we have no control over it and ever we not being able to know when download complete. so it is getting hard for me to implement by code.
i think from my question anyone can understand what i want that at a time one user can download one file at a time and will be able to download next file when first file has been downloaded in client pc.in this way i can restric the user to download large files more than one at a time.
how to implement this with code in asp.net. please help me with sample code or idea.
thankstbhattacharjee
|
|
|
|
|
You could store the user's IP address and time of download commencement in a database, and not allow another download for a certain period of time, eg: 30 mins... if they click another link, it checks if the time has expired, if it has, let them have the time and save the IP address and time, if it hasn't, don't let them download!
|
|
|
|
|
place a application state value at the end of the method(thread).
frequently check that AppState value. if present then your thread ends otherwise thread is in process
|
|
|
|
|
hi,
We have one web application. When we run this application first we will get login page there we given our credentials(Windows Authentication). It is working fine.
Now we deployed this application, now it is not redirecting next page even if we given proper username and password.
Can anybody help me how to resolve this one.
|
|
|
|
|
Tell me few things.
-Are your webserver is in same domain?
-Have you used ASP.Net membership provider or your own custom.
-What authentication mode you have have selected at IIS?Cheers!!
Brij
|
|
|
|
|
Hi,
I am trying to implement the Sqldatacaching in my application...am using asp.net2.0 and sql server 2005...
I dont know how to enable the notification services and all,, so can u anyone please explain me..
Thanks in Advance
kannak.....kannak
|
|
|
|
|
|
|
Hi,
Thanks for responding me...i got it how to enable the notification services and all.......
regards
kannak.........kannak
|
|
|
|
|
Cheers!!
Brij
|
|
|
|
|
i would like to know what is the component equal to servlet context in asp.netmodified on Tuesday, February 9, 2010 11:51 PM
|
|
|
|
|
I dont Know Much abt servlet context ..!But what are you tring to do ?If you tell what u want to do .Group can help you go in the right direction..!
Here most people dont know much abt java..!So you are asking the people who knows both languages..!That might not be a good idea..
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Please post your specific question.It'll better to get the answer. Cheers!!
Brij
|
|
|
|
|
i apologize; in my asp.net app i have a list of values taken from the db, for ex: list of items, this list
of items will be displayed in several pages in combo boxes. what i want to know is without going to db each time i need to show the items is there a way to take them at first attempt and keep them ,that will be used with in many pages.
what is the standard way ?
this can be done in java using the servlet context.
|
|
|
|
|
1.Create a class file for that particular table using GetSet method(Say Calss1)
2. Execute your Query (optional ExecuteReader)
if ExecuteReader
-----------------
SqlDataReader Dreader = thisCommand.ExecuteReader();
List<TblValue> lstTblValue= new List<TblValue>();
while (Dreader .Read())
{
Calss1 objClass= new Calss1();
objClass.TblFiled1= Dreader["TblFld1"];
objClass.TblFiled2= Dreader["TblFld2"];
TblValue.Add(objClass);
}
close the db connection
4. Now this list will have your returned column value, and objClass will have the result from the table for ever ( until next execution hits that class)modified on Wednesday, February 10, 2010 2:32 AM
|
|
|
|
|
If this list is user specific then you can put in Session varialble and if not User specific then you can put it in Application variable or Cache. Cheers!!
Brij
|
|
|
|
|
Suppose I have a web application which accepts a small amount of data from the client (so the data transfer is not an issue), then performs some very lengthy operation (minutes or tens of minutes) on the server, and returns the result back to the user. My question is - what is the preferred method of dealing with long requests? If I use regular postback, the browser will wait for the response and time out prematurely. Increasing the timeout is not a solution, because I do not want the browser to get stuck and seem unresponsive for so long.
One way I thought of is running the time-consuming operation in another thread. This way the server response is sent immediately, so there is no timeout problem. Then I use periodical page refresh to check if the thread finished its work - it displays either "Please wait" on each negative check or "Finished" with the results. The drawback of this approach is that the time intervals in which I check if the work is done are constant (say 10 secs), so even if the work happened to be very fast (finished immeditely), the user has to wait for at least 10 seconds before the first check requst is sent. Is there any way the server itself can inform when the operation is finished?
Any help regarding this matter is appreciated, I suppose this must be a well-known issue so I'll be happy if you just point me the right way.
H
|
|
|
|
|
This is the type of operation ajax was meant to handle. You can display some type of progress indicator on the page while waiting for the response with no need to continually refresh the page. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
One another way apart from Ajax as suggested by Mark, you can use Asp.Net callback to get the better response time. Cheers!!
Brij
|
|
|
|
|
Place a application state value at the end of the process(long execution)
check if there is a entry in AppValue, If it is so then the process should be completed. and take the user to corresponding page
|
|
|
|
|
Hi all,
1. I have a Virtual Dedicated Server.
2. I am getting "Unable to load DLL 'LCE.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" where LCE.DLL is a C++ dll.
3. I have .NET dll that access the C++ dll.
The error occurs when I try to call a function in the c++ dll.
//__declspec(dllexport) int __stdcall siv(LPWSTR inbuf, int seed, bool div) C++
[DllImport(@"LCE.dll")] //C#
public static extern int siv([MarshalAs(UnmanagedType.LPWStr)]string outbuf, int x, bool b);
I am pretty certain that it is NOT the dll but the permissions on the bin directory of the web site, I have tried a number of things to give the permissions to execute the dll but nothing has worked so far.
Does anyone know or point me in the direction where I can resolve this issue
help!theLizard
|
|
|
|
|
Hi
I am looking for a solution to a Java Script question. My question is this, I have a gridview, and in this gridview I have a column, which I use as a flag. The gridview itself is dynamically added to a user control and then to the page. What I would like to do is to use Java Script to hide this column, but I do not know how to do this. Unfortunately, I cannot use code behind, because of the gridview being dynamically added.
Also, I have one further question, I already have some Java Script code that can hide some of the rows based upon the values in my column when a button is clicked. What I want to do is when the page is loaded for the first time, to hide some of these rows, and to use the button in reverse to reveal them again. How do I achieve this?
Thanks
|
|
|
|
|
Look at the JQuery [^]library, it makes tasks like this very easy.
$("td.flag").hide();
This simple bit will hide any TD element with the class name flag. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I just had a quick look at this, and I am slightly confused as to how I can use JQuery to hide the rows when the page is first loaded; then to use a button show them, or hide them based on a click. Please explain.
|
|
|
|