|
If there is large volume of data in Gridview.
and no paging in Gridview. If i click the search button to search the text then the search is slow.
Mahendra
|
|
|
|
|
sumB wrote: If there is large volume of data in Gridview. and no paging in Gridview
If 'No Paging', then what else do you expect in case of large volume of data?
When there is no pagination, whole data is wired and rendered on the webpage - it will be slow. Accept it or paginate it.
|
|
|
|
|
Thanks for the Reply, You are right. I have client requirement that, I can have only vertical scrollbar. I am not worried about the slow page listing. But i am concerned when i search a single record from database and bind a single row to the grid. then the page took a long time to accept the post request. I have a textbox for search text and dropdownbox for search criteria. so when i click on Search button, The page took a long time to accept the post request.
Mahendra
|
|
|
|
|
You cannot do much here. Tune your query and DB to have quick response as much possible. UI wise, max you can do is show 'Processing...' or 'Loading...' text or icon until grid is not shown.
|
|
|
|
|
Actually I have My gridview and search button inside UpdatePanel.
so on search button click UpdatePanel took a long time.
Mahendra
|
|
|
|
|
Simply use Update Progress to show a progress to details update of Update panel. Present it to the client as maximum possible based on requirement.
|
|
|
|
|
updatepanel is not to show the progress. Instead the complete gridview and serarch button is inside updatepane.
Mahendra
|
|
|
|
|
sumB wrote: But i am concerned when i search a single record from database and bind a single row to the grid.
This is the query problem. Nothing to do with update panel,page or Gridview. Run the query using profiler so that you can come to know how much time it is taking to execute and where you can fix the problem.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
|
Hi,
I am using an upload control. I want to know how can upload the file to MySQL table (employee_cv field) instead of uploading physical file to physical directory?
|
|
|
|
|
|
I have set Session TimeOut=1440. But my application takes the default TimeOut.
Thanks in advance.
|
|
|
|
|
Quote: I have set Session TimeOut=1440
why such a huge time. MSDN article Session TimeOut[^] says, it should not be more than 20 minutes. Session is very crucial memory of the system. set the timeout for comparable time.
with regards
Karthik Harve
|
|
|
|
|
I have couple of things i want to mention in response to your question:
1. Do not set session timeout value to such a large interval. msdn recommends it to be around 20 minutes.
2. The session timeout value specifies the time ofter which the user session data will be flushed under normal conditions. if the server runs out of memory it will anyway start clearing the session objects.
3. If the ASP.NET application restarts the session values will be lost.
so in your case the session timeout must be happening mainly because of second reason and sometimes because of the third.
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
|
|
|
|
|
|
My ASP.net application uses a common class I added to my App_Code folder which has all of the methods I use more than once throughout the application.
Because this class is used in the masterpage, almost all site aspx pages and multiple usercontrols, I am instantiating the class multiple times in each request.
I am instantiating the class in the page_load of pages and controls and then setting it to nothing on each page_unload.
There is nothing in the class that needs to maintain state between requests.
Is there a better way to do this or is that the normal approach?
It seems so inefficient to me to be creating/destroying the class in every code behind file.
I was wondering if there would be any advantage to putting the class in each users session for re-use for the lifetime of the session.
I don't know if there would be any advantage to that approach or not.
i was thinking of checking (each time I instantiate) if the object is in session and if not add it and if its already in session, return the object.
I guess I could do that in the objects constructor.
Any suggestions much appreciated
Heres what I am doing in every code behind file now:
Dim c As New CommonCode()
Public ReadOnly Property C As CommonCode
Get
If C Is Nothing Then C = New CommonCode
Return C
End Get
End Property
Protected Sub btnPostComment_Click(sender As Object, e As EventArgs)
Dim name As String = IIf(txtName.Text = [String].Empty, "Anonymous", txtName.Text)
If txtComments.Text <> [String].Empty Then
c.PostComment(ID, name, txtComments.Text, RadRating.Value)
End If
End Sub
Protected Sub Page_Unload(sender As Object, e As System.EventArgs) Handles Me.Unload
c = Nothing
End Sub
|
|
|
|
|
IMHO, you need this class and the current approach is to create it in each page. which means you are acquiring some memory and taking some time to create the object.
If you keep the object in session then you will still be using than much of memory but the only advantage will be the overhead required in creating the object every-time will be gone.
1. But, in your current approach your object was being created on demand and if you keep this object in session that will like in user memory for all the time so I don't thing this is a good idea to save this in sessions.
2. Even with the overhead for creating object each time gone, you will still need the typecasting of session variables in each page which will effectively nullify the benefit we got.
3. putting this object will put some overload on session, which could mean that the session may be lost earlier than it should have(if number of request are more) and we will loose more valuable session info because we have this object residing in session memory.
My recommendation would be to keep it as you have implemented. Session should only be used for the crucial information. If you need to access this info frequently then perhaps you can think about storing it in Cache instead of Session . and if it can be reused across users keep it in Application variable.
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
|
|
|
|
|
Dear All,
In a DevExpress grid how to get the dropdown list value while saving the records.
Thanks,
Basit.
|
|
|
|
|
|
Hi,
I am using DevEpress textbox and I want to make validation expression for it.
I want the entry to be MINIMUM 10 digits no matter what is it, characters, numeric, special characters or mix BUT not SPACES
how can I make sure thing?
|
|
|
|
|
|
Hello,
plz help me i want to send email from asp.net web application in our godaddy server.
.......................
|
|
|
|
|
|
For GoDaddy, you need to use:
servername: relay-hosting.secureserver.net
port: 25
Thus, email code should be something like:
MailMessage msg = new MailMessage();
msg.From = new MailAddress("myEmail@abc.com","My Company");
msg.To.Add("toFriends@abc.com");
msg.Subject = "My Subject";
msg.Body = "My Message";
msg.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("relay-hosting.secureserver.net", 25);
smtp.Send(msg);
Try!
|
|
|
|
|
this code have some chinese,if you know
#region :Send Email
///
/// Send Email(Success return true, faile retuan false)
///
/// <param name="strBody" />content
/// <param name="strSubject" />theme
/// <param name="strFrom" />send email
/// <param name="strFromPwd" />send keys/param>
/// <param name="strTo" />get email
/// <returns>Success return true, faile retuan false
public static bool SendMail(string strBody, string strSubject, string strFrom, string strFromPwd, string strTo, string strSmtp)
{
bool b = false;
// 邮件信息(属性)
MailMessage mm = new MailMessage();
mm.From = new MailAddress(strFrom);
mm.Subject = strSubject;
mm.SubjectEncoding = Encoding.UTF8;
mm.Body = strBody;
mm.BodyEncoding = Encoding.UTF8;
mm.IsBodyHtml = true;
mm.Priority = MailPriority.Normal;
//// 获取 SMTP 服务器
//string Smtp = string.Empty; // smtp 地址
//// 取得后部分的 smtp地址
//string strSmtp = strFrom.Substring((strFrom.IndexOf("@") + 1));
//Smtp = "smtp." + strSmtp;
// 发送邮件
SmtpClient sc = new SmtpClient(strSmtp);
// 用户凭证 (email 地址和密码)
sc.Credentials = new NetworkCredential(strFrom, strFromPwd);
if (strSmtp == "gmail.com")
{
sc.EnableSsl = true;
}
sc.Timeout = 5000;
mm.To.Clear();
mm.To.Add(strTo);
try
{
sc.Send(mm);
b = true;
}
catch (ArgumentNullException ex)
{
b = false;
}
catch (SmtpException smtpEx)
{
b = false;
}
catch
{
b = false;
}
// 释放资源
mm.Dispose();
return b;
}
#endregion
|
|
|
|