|
That sounds like the proper behavior to me. Every button / hyperlink click regardless of being on a master page, or within a webform placeholder is going to generate a postback to the server.
If you want to use a button or hyperlink and not generate a complete postback, then you have to use Javascript, to SHOW / HIDE a control or object.
So you add onClientClick to the control object, and that will fire before a postback is generated.
onClientlick="return false;" will return false and cancel the next action.
return true will proceed to the next action.
|
|
|
|
|
Hi Experts,
I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode".
I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs".
My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs".
Is this Possible? if so, please give me the solution.
|
|
|
|
|
HI,
1) you need to create one class library project for VB.
2) add your VBClass in that project.
3) build VB project and add DLL file into CSProject.
4) Add reference in your CSClass.
5) use VB functions
Thanks
-Amit.
|
|
|
|
|
Thanks for your reply.
Other than this, is any other options?
|
|
|
|
|
No,as per my knowledge
actually in single project you can not have multiple languages supported for now.
do you have any problem creating different project ?
thanks
-amit
|
|
|
|
|
No problem.. but, checking for any other alternative for this problem.
|
|
|
|
|
if you like my solution please give rating
thanks
-amit.
|
|
|
|
|
|
I tried that years ago and it didn't work. Can't mix vb and csharp together in the same project. When you publish or run the project, the app_code folder gets compiled into a single or multiple dll's, not sure which but they don't mix.
It's kind of like having webforms with a mixture of cs and vb code behind pages.
You need to rewrite one of them if you want to keep them in the App_Code.
|
|
|
|
|
now I using IIS 5.1.
I created web application project using Visual Studio 2005 &
SQL Server 2005. then
I created virtual directory on IIS 5.1.
I attached database in MS SQL server 2005.
My web application contain ASP.Net 2.0 membership & login control.
When I browse my application from Browser using..
http://localhost/...
my application runs correctly.
But.
I cannot use Login control.
Login control just display when I run.
But it is not working, when I use log in control.
How I have to configure IIS 5.1
I am very confusing now, reading other help from Online.
Please help me.
|
|
|
|
|
Sounds like your not finished.
Did you setup your database and table, and enter a user and password in it.
I remember seeing a complete MS kit, in which you can download a starter program that already has all that going, and it sets up your sql server as well, so you get instant gratification within about an half hour.
|
|
|
|
|
I finished setup database and tables.
I used Asp.net membership provider.
what microsoft starter kit, you mean?
where can I get, please?
thank
|
|
|
|
|
I wasn't able to find it, looks like it was replaced with something even easier to use and setup.
[^]
I don't recommend that you install it, but take a look around. I think you should fix your issue first. But figuring out whats wrong is a 3 step approach.
1. Create a user and password in your table.
2. Write a program to create users and passwords.
3. Write a program for the users to login to.
4. Program your pre-made control to login and test it.
|
|
|
|
|
i created crystal reports.but when i am clicking on button to view the report it is asking for username and password of sql server.so how can i over come these problem.plz help me regarding this.
thank you,
with regards,
C.Kalyan
|
|
|
|
|
hi i got the solution,i need to write code in code behind to avoid this line the report you requested requires further information.i am just giving my sample code below
code;-
public partial class Crystalreport : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ReportDocument scrd = new ReportDocument();
scrd.Load(Server.MapPath("STONECRUSHER.rpt"));
scrd.SetDatabaseLogon("sa","Mobile123",@"MOBILENET01\SQLEXPRESS","STONECRUSHER");
CrystalReportViewer1.ReportSource = scrd;
}
}
|
|
|
|
|
Hi All
string FilePath = strphysicalpath + @"Documents\TempReports";
DirectoryInfo di = new DirectoryInfo(FilePath);
di.Attributes = FileAttributes.Normal;
foreach (string fileName in System.IO.Directory.GetFiles(FilePath))
{
System.IO.FileInfo fileInfo = new System.IO.FileInfo(fileName);
fileInfo.Attributes = FileAttributes.Normal;
}
string[] filePaths = Directory.GetFiles(FilePath);
foreach (string filePath in filePaths)
{
File.Delete(filePath);
}
I use this code to delete all my files in the Folder, but I am getting "Access to the path is denied"
Please help.
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
if it's the second file, you need to release the first file.
fileInfo = NULL;
|
|
|
|
|
Always wrap your code in "Pre" tag, because it will give better readability and accessibility.
|
|
|
|
|
now I am trying to make virtual directory for asp.net 2.0 web application.
I know how to make virtual directory.
in my web project, App_Data contains database (.mdf) file.
then, I change web.config connection strings like that:
"Data Source=(local);AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True" providerName="System.Data.SqlClient"
I used auto attach connection.
But now,when I browse this application from browser, It shows error like below.
CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:\Inetpub\wwwroot\WebHelpDesk\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I don't know how to slove.
pls share me , giving idea how to solve.
I also checked in SQL server 2005 management.
I detached my database file in SQL server.
but it shows error like above.
|
|
|
|
|
Did you assign the correct permission to the App_Data folder for NetworkService, or what ever user is required for writes.
|
|
|
|
|
Hi,
i am not able to get where you got this problem. but another solution for this is, you can install your database in your SQL server and change your connection string to point local SQL instance and your database.
hope this will help you.
thanks
-amit.
|
|
|
|
|
I have a web forms app where I use Windows authentication and built-in authorization based on the logged on Windows user. I don;t make explicit use of session state anywhere in my application code. Therefore, my web application has zero log on or log off functionality, but the client has expressed concern that because users never actively log off, we are left with unused session objects or similar such things left lying around, affecting performance and memory.
First, is there any risk of what the client fears? Then, what housekeeping practices can I adopt to prevent this happening if it does, or to mitigate the effects?
|
|
|
|
|
|
Thanks, but neither of those links tells me what happens to sessions if I do northing with or to them.
|
|
|
|
|
The two concepts I was trying to point you toward are:
Session Timeout - If the user does not refresh or request a page within the time-out period, the session ends.
Session Abandon - If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.
From the above information, I believe we can conclude that you don't have to do anything special in your web application, the IIS server has a session timeout value default around 20 or 30 minutes after the timeout period, the inactive users will have their session ended and the IIS server will destroy the memory and resources allocated to that session.
Please correct me if I'm wrong, but that is how I understand it.

|
|
|
|