|
Hi
I am developing an web site in ASP.NET using c#.
Site run fine when number of users are limited say 9 to 10.
When we open 3 browser from 4 to 5 pc for testing purpose then in some browser it some css files or js doesn't get downloaded.Also it gives Time Error for Session means get Session get killed.
If there is any setting IIS or in Web.config file to increase connection pooling,please reply.
Swapnil Bhavsar
|
|
|
|
|
Sounds like you have bandwidth issues. So long as you're not using SQL Server Express Edition, there's no generic reason for you to have this issue that can be solved in code or in your config.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi everybody, first offall i would like to thank evry body in this group.
i have a problem in java scrpt.
now i am developing a web application which is having three froms lets say
form1.
form2.
and form3
and java sceipt file named jscript1
i have use one java script for validation the input.
i have written to the coding in jave script.and also it is waorking but only for form1. not for other two forms.
can u tell how can i acess the same script in other two forms inorder to validate the input..
biswa007
|
|
|
|
|
Just by including the js in all the forms.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Make sure you include the javascript file in your page, which I guess you already have done so...
Then.. in your jscript1 function. When you do the validaction to check the input, did you pass in the form name?
Example, if you have such code: form1.txtTextBox.value = "xxx"; Then you need to make sure in your form2 and form3, you have the same form name, "form1".
Eliz.K
http://www.oin1.com/Technical/JavaScript/CommonlyUsedFunction.htm
|
|
|
|
|
Hello All,
I am trying to integrate blogs in my application but iam getting an error
The error what iam getting is mentioned below
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Please help me in fixing this error
Thanks & Regards
Taha Ali
|
|
|
|
|
It means you have an asp.net app in a subdirectory, and like the error says, you need to configure a virtual directory at that subdir level in IIS
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Case:
1) Datagrid Bound columns generated at runtime and populated from the dataset.
2) Datagrid contains a select button. When the select button is pressed a new report is generated.
Language: Visual Studio 2.0, ASP.Net, C#
Problem: During the first page_load grid is populated properly but when it is postback Datagrids items and cells are not visible in the select buttons itemcommand method.
By referring the articles in the google i came to know that i should not be using page_load, instead i should call the method in the initializecomponent() , but since i am working on .Net 2.0 it does not have initializecomponent method. I have also tried PreLoad and its not working.
Please find below my sample code so that u get a better idea.
--Sample Code Starts Here
protected void Page_PreLoad(object sender, EventArgs e)
{
if (!IsPostBack)
{ getdata(); }
.....
}
public virtual void grdvwCheckbox_ItemCommand(object s, DataGridCommandEventArgs e)
{
if (e.CommandName == "Select")
{
e.Item.BackColor = System.Drawing.Color.Wheat;
DataGrid dg = (DataGrid) s;
.........
}
}
public void getdata()
{
DataSet ds = new DataSet();
string rptDetails;
rptDetails = txtRptDetails.Text;
GridReports objBO = new GridReports();
ds = (DataSet)objBO.GridData(rptDetails);
grdvwCheckbox.AutoGenerateColumns = false;
foreach (DataColumn c in ds.Tables[0].Columns)
{
grdvwCheckbox.Columns.Add(CreateBoundColumns(c));
}
...................
}
--Sample Code Ends Here
Hope this helps u to help me.
If u have any working sample code in .Net 2.0 where Bound columns are created at runtime and ItemCommand event is fired then please forward it to me.
A quick reply will be really helpful.
Please feel free to revert in case of any clarification.
Thanks!
|
|
|
|
|
If it is not working on preload, try Init
protected void Page_Init(object sender, EventArgs e)
{
Initialize your control here
}
|
|
|
|
|
Thanks for your reply,
It is not working with Init. If u have any working sample code in .Net 2.0 where Bound columns
are created at runtime and ItemCommand event is fired then it might help.
Regards,
Anees
|
|
|
|
|
Anees Mitha wrote: It is not working with Init.
It will if you remove postback checking. Remove !IsPostBack when calling getData();
|
|
|
|
|
Great show sir, it does work. Thanks.
But the only problem now is that for every ItemCommand event it will make a round to the database which will be very costly in my case where the reports are huge. So apart from this is there any other way round to achieve the same results.
Anyways i really appreciate your help and support. Thanks a ton.
Regards,
Anees
|
|
|
|
|
Anees Mitha wrote: it will make a round to the database which will be very costly in my case
You can cache the dataset. This will avoid round trip to server
|
|
|
|
|
|
I created a class which checks session and redirects to login page. My class looks like this. This class inherits Page class to get access to session object.
public class CAuthentication:System.Web.UI.page
{
public CAuthentication()
{
if ( Session["login"] == null )
Response.Redirect("expired.aspx");
}
}
My ASPX.CS looks like
public partial class MyPage:CAuthentication
{
}
This is not working. I am getting error "session can't be used inside a class" . What is wrong here ? Normally codebehind file used to inherit System.Web.UI.Page , Instead of this I inherited this in my CAuthentication class. Where I am going wrong ?
|
|
|
|
|
Please check it with HttpContext.Current.Session["login"].
|
|
|
|
|
Nicejith wrote: HttpContext.Current.Session["login"].
Thanks, But still it shows Object Reference error.,
|
|
|
|
|
N a v a n e e t h wrote: Normally codebehind file used to inherit System.Web.UI.Page, Instead of this I inherited this in my CAuthentication class.
Why do you need to do this??
For your session check, you can use your existing class and I suggest you should pass the Session object to your session checker function and then check the sessions and proceed to redirection. Like
<br />
public CheckAuthentication(System.Web.SessionState.HttpSessionState oSession ) <br />
{ if ( oSession["login"] == null )<br />
Response.Redirect("expired.aspx"); }<br />
Also pass the response object the same way.
NOTE: Remove the inheritance from your class
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
_mubashir wrote: Why do you need to do this??
Thanks, I need to do this because, this simplifies my job than passing Response , and SessionState object to Checking functions. In all my pages I need to check this session. So i thought it's better to go for inheritance method. May be that is a bad approach, but still it has to work when we think the program flow. Any Idea on what is going wrong here ?
|
|
|
|
|
Hi, I have been working on this for over two weeks and its not working. I don't know what else to do since I'm really green at this. I'm trying to display binary data from a database using Response.Write(). Please take a look to see where I went wrong, thank you in advance for your help.
Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim DBConn As OdbcConnection
Dim DBCommand As OdbcCommand
Dim DS As New DataSet
If Not LBoxProfessions.SelectedItem Is Nothing Then
DBConn = New OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=myDB;Database=myDB;User=myUser;Password=myPW;Option=3;")
DBCommand = New OdbcCommand("Select ResumeID,Resumes,DocType, from tb_content where Professions = '" & LBoxProfessions.SelectedItem.Text & "' Limit 10 Offset 10", DBConn)
DBConn.Open()
Dim AD As OdbcDataReader = DBCOmmand.ExecuteReader()
If (AD.Read()) Then
Dim contentLength As Integer = Convert.ToInt32(AD.GetBytes(0, 0, Nothing, 0, Integer.MaxValue))
Dim buffer As Byte() = New Byte(contentLength - 1) {}
AD.GetBytes(0, 0, buffer, 0, contentLength)
'Resumes is the field in the database table that holds the documents
Response.AddHeader("Content-Disposition", "attachment;filename=Resumes")
'DocType is the field that holds the mime types
Response.ContentType = DirectCast(AD("DocType"), String)
Response.BinaryWrite(buffer)
Response.End()
End If
DBConn.Close()
End If
End Sub
-- modified at 5:11 Saturday 4th August, 2007
|
|
|
|
|
What is your question ? Why don't you look up a column to read your binary data ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Basically I'm doing what you've suggested last week. First I stored the mime types of each binary file in a field called DocType in my database. So if an image file is stored in the Resumes field it would have a mime type of "image/gif" etc. Then after I connect to the database I use the datareader to read the data then put the data into a byte array. Then I use the following two lines to determine the name of the file to be displayed and to determine its content type.
'Resumes is the field in the database table that holds the documents
Response.AddHeader("Content-Disposition", "attachment;filename=Resumes")
'DocType is the field that holds the mime types
Response.ContentType = DirectCast(AD("DocType"), String)
I have a typo in my code and its "filename=ResType" I've already changed that to Resume. Don't you run away after giving just a vague response Christian 'cause I really need your help lol. When a list item is selected its suppose to show a file but its not working, I'm very frustrated right now. Thanks for replying
-- modified at 5:29 Saturday 4th August, 2007
|
|
|
|
|
Yeah, but when you fille the buffer variable, you don't use a column name to get to the data in question, you just do a read on the row itself.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have made a small application which process Mail Items (Notes Items) and save its properties in database. I have used outlook object model.It is working fine but for one message it gives an error as below.
"Cannot open this item.Out of memory or system resources. Close some windows or programs and try again."
Even this message also can't be open in outlook. I don't want this error comes while processing.So I don't want to process this message from my application. Is there any property of the message from which I can detect that it can't be processed? If any one knows please reply.
Thanks,
Pavan
|
|
|
|
|
hi,
I am using MS .NET 1.1
i want to create an image gallery ..
which control should i use to do this??
means i want to show 5 images in first row and next 5 in second and so on...
All I ever wanted is what others have.... CrazySanker
|
|
|
|