|
I have created a page that stores a DataSet in a session variable and remove the session variable once the user navigates away from it. There are about 5 grids each with about 4 columns and 3-4 rows and two Developer Express comboboxes which I could see from the view source writing a lot of scripts. I have them all put inside an update panel. The problem is the page is taking too much time b/w postbacks(async).
The yslow shows the following in F grade:
-Make Fewer HTTP requests
-Use a content Delivery Network
-Add Expires headers
-Minify Javascript and CSS
-Configure entity tags.
These two D grades:
-Minify Javascript and CSS
-Configure entity tags.
This one in E grade:
-Reduce the number of DOM elements.
My browser is IE 7. To my surprise the page is pretty faster in the latest version of FireFox.
|
|
|
|
|
tonymathewt wrote: I have created a page that stores a DataSet in a session variable and remove the session variable once the user navigates away from it.
Sounds dumb to me.
tonymathewt wrote: To my surprise the page is pretty faster in the latest version of FireFox.
No surprises there.
I would check to see how long your database calls take, I would check to see how the update panel performs ( fast AJAX means writing your own code, the ASP.NET library is far from efficient ), and I'd check to see what I was databinding if I don't need to. I'd also check viewstate size to see if I'm posting a massive page every time. You could have the data from your dataset in viewstate, and have it stored in the session as well.
\
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thank you Christian
I am actually updating the dataset to the Data base before removing (trying to reduce the Database hits). Updates are done directly on this dataset and then used for adaptor.update(). The dataset is kept in a session variable b/w postbacks. Do you find anything wrong with this approach?
|
|
|
|
|
Yes there are lots of things that improves performance of your page. Writing Dataset to Session variable is really not good. Remove viewState by using
EnableViewState ="false" if you are not using it. this would reduce the page size by a lot.
Minify javascript means removing whitespaces from javascript. I always use minified javascript for requests. And if possible, apply a cache header to the CSS and JS files.
Reduce the number of DOM elements means reducing large no of hiddenfield, Tables, Divs, etc. Just reduce them and apply CSS to position it perfectly.
You might use
Compress-Response-and-HTML-WhiteSpace-Remover[^]
to compress your page. By this way you need to create others.
|
|
|
|
|
Abhishek, I need to reduce DataBase hits that's why I am keeeping the DataSet in Session variable.
Abhishek Sur wrote: Remove viewState by using
EnableViewState ="false" if you are not using it.
Do you mean to set this property for each control?
|
|
|
|
|
i want to send data from an aspx page to html page using query strings....
please help........
|
|
|
|
|
HTML is a markup language, not a programming language.
AFAIK i Think You have to use lava script or like thing.
try searching accessing JavaScript in html
http://lmgtfy.com/?q=javascript+in+html[^]
How Large is the data..!There is some restriction in passing the data in query string..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Which bit are you stuck on ? What have you tried ?
I assume you intend to manipulate your HTML page using javascript, is that the problem ? As far as I can see from a google search ( did you try that ) all you can do with javascript is string mashing. Why can't your other page be an aspx ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
is there some way i can give the RowIndex as the data key in a gridview?
|
|
|
|
|
What r u trying to do can you be more clear..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
i actually want to use to link buttons in one gridview .both the buttons perform different actions on click.
earlier i had done this by using the
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
event for one button and for the other button i used
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
Session["sr_no"] = Convert.ToString(GridView1.DataKeys[e.RowIndex].Value);
}
here i had set a serial no from the data base as the data key and it worked fine but my current table does not have any serial no or a counter so am not able to set the datakey.
|
|
|
|
|
I think You are going in the wrong way ..!
first try to use command button and handle the events in ItemCommand
AND handle the command name by e.CommandName
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
I want to implement login as different user in my intranet application i have done the following
I think I'm half way to finally do it!
I noticed that the response code it overriden by 200 ok after setting it to 401!
So, After I set the status code to 401, I used Response.flush() to immediately send that.
protected void lnk_logoff_Click(object sender, EventArgs e)
{
Response.StatusCode = 401;
Response.Flush();
Response.Close();
}
After I put it in event handler of a link button, when I click that linkbutton & voila... the windows logon popup appears to switch Users, However, I noticed that I've to enter the windows credentials multiple times in sequence inorder for the windows logon popup to go away!!! but I actually login correctly after that.
After debugging I found that a single click on the linkbutton, will hit the breakpoints in the event handler of the linkbutton click as well as the pageload, 3 or 4 times in a row, I don't know why, but it is a start.
If any one could try tell me & help to clear out, why using Response.Flush() with Response.StatusCode = 401 causes the page to be requested 3 times in a row?????!
|
|
|
|
|
Can i have 2 link buttons one for update command and the other for select command on the selected index change of a gridview.that is if an update link has been pressed for that particular row the update query will fire and on the select command another command will fire..
|
|
|
|
|
add a template field and assign it to command button..!
try this article
GridView all in one[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
I am working on custom control. I am creating databound control. I have one property name RowDataSource that
accept DataRowCollection as data source and I bind control on OnDataBinding event. I have another property
name RowItem.
My code looks like this.
public DataRowCollection RowDataSource
{
get
{
if (ViewState["rowDataSource"] == null)
{
ViewState["rowDataSource"] = null;
}
return (DataRowCollection)ViewState["rowDataSource"];
}
set
{
if (value == null)
{
throw new ArgumentException("unvalid data source.", this.ID);
}
ViewState["rowDataSource"] = value;
}
}
public RowCollections ExelRows
{
get
{
if (rCollection == null)
{
rCollection = new RowCollections();
}
return rCollection;
}
}
OnDataBinding event code
protected override void OnDataBinding(EventArgs e)
{
base.OnDataBinding(e);
if (RowDataSource != null)
{
foreach (DataRow dr in RowDataSource)
{
RowItem item = new RowItem();
item.Text = dr[rTitle].ToString();
this.ExelRows.Add(item);
}
}
}
CreateChildControls method to render control
protected override void CreateChildControls()
{
if (ExelRows.Count > 0)
{
}
}
Now, I am binding this control with DataRowCollection and It works file. I have one button in this control and
I am raising bubble event when button is clicked.
My problem is that when I click on button then CreateChildControls method is called first before OnDataBinding event.
so I am getting ExelRows.Count = 0.
so what I have to do to getting all rows on every bubble event of control.
Thanks
Imrankhan
please don't forget to vote on the post that helped you.
|
|
|
|
|
1. Google Maps, Street View API
2. Interfacing with it and determining location using IP addresses and not Latt, Longg to provide location based services, providing street views, providing driving directions
how can i do this?
Thanks.
PUJA FALDU
|
|
|
|
|
pujafaldu wrote: location using IP addresses
first convert the ip address into location and pass the location using latitude ang longitude to the google maps
For canverting IP address
first google hits[^]
First google hits[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Thanks for help.
next i want to know how can i get latitude ang longitude of given address.
Thanks.
PUJA FALDU
|
|
|
|
|
First try to implement that ..!
Once You got the address its matter of time You can get the lats and long.
With the help of google interface You can get ..!
all the best
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
<html>
<head><title>SALARY DETAILS</title>
</head>
<body>
<form name=frm action="sal.aspx">
Emplyee Name:<input type=text name=txtname><br>
HRA :<input type=text name=txthra><br>
DA :<input type=text name=txtda><br>
TA :<input type=text name=txtta><br>
PF :<input type=text name=txtpf><br>
Salary :<input type=text name=txtpf><br>
<input type=button name=btn value=Calculte onclick=checks()>
<script language="javascript">
function checks()
{
if(document.frm.txthra.value>100)
{
alert("HRA CANT Be More Than 100");
document.frm.txthra.focus();
}
else if(document.frm.txtda.value>100)
{
alert("DA CANT Be More Than 100");
document.frm.txtda.focus();
}
else if(document.frm.txtta.value>100)
{
alert("TA CANT Be More Than 100");
document.frm.txtta.focus();
}
else if(document.frm.txtpf.value>100)
{
alert("PF CANT Be More Than 100");
document.frm.txtpf.focus();
}
else
{
document.frm.submit();
}
}
</scrip></form>
</body>
</html>
getting error at <input type=button name=btn value=Calculte onclick=checks()>
|
|
|
|
|
assign id also .... like this
HRA :<input type=text name="txthra" id="txthra" ><br>
|
|
|
|
|
Hi,
I prepared a bookmark related exe, now I want to add it to mozilla fire fox and internet explorer. Is it possible to add our application to browser through programmatic way. If you have any references please send me.....
Thanks In advance........
sampath-padamatinti
|
|
|
|
|
after user login how we get their details in detail view component. like in login form if we insert abc as username and some password..after login how i can display the information of abc in details view component... there details are saved in database
|
|
|
|
|
plz send me the code in c#
|
|
|
|