|
exactly you are right.
but is there anyother way to force the user to do "LOGOUT" process?
|
|
|
|
|
I don't know mate, I'm not a web dev, sorry
|
|
|
|
|
No. You can't prevent a user from clicking the close button on the browser or browser tab nor can you prevent them from navigating to another page.
only two letters away from being an asset
|
|
|
|
|
Karan_TN wrote: Moreover,
in my project there are nearly 100 pages. do i want to implement this code in all pages?
Of course you don't. A properly designed application will separate this type of logic from the page. If your Javascript methods are in a separate file all you need to do is include the file reference. Better yet, if you are using master pages, include it in the master page and all content pages will have it also.
only two letters away from being an asset
|
|
|
|
|
thanks for your kind replies
|
|
|
|
|
Hello Experts,
I am using VB.Net with visual Studio 2005 and Access Database.
I am creating some reports to show first in Grids and print thereafter. The method that is available for me is:
1. Use Complex select queries to retrieve entire fields to be populated. Like No of Students in Class, No. of Students in Current Session, Total Pending Fee in Class.
2. Prepare little functions to retrieve field values individually and combine all to store in dataset.
3. Any other effective way that you can suggest.
If I use (1) first option, I think retrieval will be faster. but I have to calculate that many times depending upon the de-normalisation pattern and table to be joined.
If I use functions code re-usability will be done but I think calculating the figure for 500 times will not be time effective solution.
Please suggest me how to achieve this.
Thanks
Jaidev Khatri
|
|
|
|
|
My preference is always to have the database do as much of the work as possible. I would rather have a more complex SQL statement that returns a single result set with all my data than to execute a bunch of queries and piece the results together in programming code.
You might be surprised with how easy the "complex" queries can be. If you're having trouble there, post to the General Database forum.
|
|
|
|
|
Yes exactly, we are using both ways. further may I know which should I superside. Time factor or code reusability.
My selection would be Time factor.
|
|
|
|
|
JayKhatri wrote: further may I know which should I superside. Time factor or code reusability
I'm not sure what you mean by this. I'm not sure what the question is.
|
|
|
|
|
as a new comer in the life of windows application using vb.net. my question is how to display a 3 or more tab, each tab have datagrid and each tab with datagrid have different table.
In a form, I have 2 textbox, 3 or more tab and each tab have datagrid, if you run the program, the first textbox enter the id_no, let say the id_no is the primary key in the master file with no duplicate. If the primary key or id_no is incorrect after pressing the "enter key" message box says id no does not exist otherwise display the name in the second textbox and also display all information at the first datagrid of the first tab with the same id_no comming from the first textbox. let say the id_no have 3 rows coming from the first table. table with duplicate id_no. same with the 2nd tab, display at the 2nd datagrid with the same id_no coming from the 2nd table. let say the id_no have 4 rows, table with duplicate id_no. same with the 3rd tab , so on and so fort.
textbox1 = 1234
textbox2 = juan dela cruz
id_no os price
tab1/datagrid1 = 1234 printer 5,000
= 1234 cpu 10,000
= 1234 monitor 5,000
id_no oe price
tab2/datagrid2 = 1234 table 6,000
= 1234 cabinet 7,000
= 1234 chair 1,500
= 1234 aircon 20,000
os = office supply
oe = office equipment
|
|
|
|
|
Hi,
I am trying to create a Visual Studio 2005 Add in, that should call an Winform application to gather some info from user.
I have hosted the Form code in a new AppDomain and have obtained the required fields back via AppDomain.SetData and GetData methods.
Problem is, VS is unloading silently, even if the WinForm did not throw any exception.
Here is the code for the Exec method:
public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled)
{
handled = false;
if(executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault)
{
if(commandName == "TestVSAddIn.Connect.TestVSAddIn")
{
AppDomain wizardDomain = null;
try
{
if (String.IsNullOrEmpty(this.applicationWizardAssemblyName) || !File.Exists(this.applicationWizardAssemblyName))
throw new InvalidOperationException("Installation error.");
if (wizardDomain == null)
{
AppDomainSetup wizardDomainSetup = new AppDomainSetup();
wizardDomainSetup.ApplicationBase = applicationWizardAssemblyPath;
wizardDomainSetup.PrivateBinPath = applicationWizardAssemblyPath;
wizardDomain = AppDomain.CreateDomain("WizardDomain", null, wizardDomainSetup);
wizardDomain.SetData("RunningFromVS", true);
}
wizardDomain.ExecuteAssembly(applicationWizardAssemblyName);
if (wizardDomain.GetData("OpenInVS") != null && wizardDomain.GetData("SolutionPath") != null)
{
bool openInVS = Convert.ToBoolean(wizardDomain.GetData("OpenInVS"));
string solutionPath = Convert.ToString(wizardDomain.GetData("SolutionPath"));
if (_applicationObject.Solution.IsOpen)
{
_applicationObject.Solution.Close(true);
}
_applicationObject.Solution.Open(solutionPath);
}
}
catch (Exception ex)
{
try
{
Logger.LogThis("Error occurred while running the wizard. Please undo the changes manually.");
Logger.LogThis(ex.Message);
}
catch { }
}
finally
{
if (wizardDomain != null)
{
AppDomain.Unload(wizardDomain);
}
}
handled = true;
return;
}
}
}
The code is running fine till "return" statement and end of the method, and then suddenly, the "OnBeginShutdown" is getting executed.
I have tried to open the solution file indicated by "solutionPath" variable from a modified code, where the AppDomain operations are commented out, and that works fine.
What am I doing wrong here?
|
|
|
|
|
how to insert data into database using sqldata adapter
|
|
|
|
|
Have you read the documentation for SqlDataAdapter ?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi friends, there is a project which contains more than 10 small projects. These projects contains their respective exe's. Each project has some dlls to perform particular operation. Each dll is build by linking with either header1 or header2. My task is to integrate them in one project and make one exe i.e. code integration. I have almost finished it. When I run the project then it is giving error as "Attempted to read or write protected memory. This is often an indication that other memory is corrupt" for those projects whose dlls are linked with header2 and its fine working for those projects whose dlls are linked with header1. I have linked the new project with each and every dll required for operation. No errors while compilation. But it's giving an error while performing operations. Do you have any solution for my problem?
http://nnhamane.googlepages.com/
|
|
|
|
|
I will try to explain exact problem, there are two headers i.e. header1 and header2. header2 is same as header1 with extra functions. Namespace and class names are same in header1 and header2. header1 is linked to project before header2 and it has less functions. So whenever extra function getting used that time error message is coming. Actually due to same namespace and sequence of headers first preference is to header1 and that does not contain that extra function. This should not happen actually. I can't change namespace names of headers, because I have only headers not code. If I change the sequence of linking then problem is occurring for header2, because that header also does not contain some functions. If you got my problem then please suggest me. And one more thing independent projects are working fine. If I debug the whole project then also same problem is occurring. Thank you and regards.
http://nnhamane.googlepages.com/
|
|
|
|
|
hi everyone! while installing both visual studio 2005 and 2008 i am getting the error "suite integration toolkit executable has encountered a problem and needs to close" ...when i open the error report the following file is included in the error report ....C:\DOCUME~1\OWNER\LOCALS~1\Temp\41a2_appcompat.txt
what is the problem? I am using Windows XP service pack2 ,v.2096 build 2600 .Thanks
|
|
|
|
|
I copied the error text into Google and got several hits on this; which did you try? This[^] is the most promising link.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Are you serious? You know C# well, but can't understand the "aim" of the .NET framework?
I am even more confused than you claim to be.
|
|
|
|
|
Hey budy .............. i learned C++ and with out knowing what it is in our lab .............. i started working C# forms(very easy one) ................ coz most of the time I learned by my slef .............. after a while I downloaded some c# codes and see what i can get .......... so how could you expect me to know it without any clue about it ........................ I just post this question to get some idea from u guys ................. but every body whistles ............................ any ways if you are ok with that I wish you could helped me.
Thank you
|
|
|
|
|
You can not be serious!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hey budy .............. i learned C++ and with out knowing what it is in our lab .............. i started working C# forms(very easy one) ................ coz most of the time I learned by my slef .............. after a while I downloaded some c# codes and see what i can get .......... so how could you expect me to know it without any clue about it .......................... I just post this question to get some idea from u guys ................. but every body whistles ............................ any ways if you are ok with that I wish you could helped me.
Thank you
|
|
|
|
|
matiIsGreat wrote: i learned C++ and with out knowing what it is in our lab
And did you use MFC or ATL in any of this C++ that you wrote?
Do you understand what they are?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hey budy I didnt learn that much .... I told you I dig my self ......... so I dont know what MFC or ATL are ............ can you tell me what they are?? By the way I got a nice answer from some one else on this thread ....... thanks
|
|
|
|
|