|
|
Good Day All
i have a repeater control that i bind with 10 000 records and it handles it nicely and its defined like this
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>ID</th>
<th>Recipient</th>
<th>Possible Bank</th>
<th>Amount</th>
<th></th>
</tr>
</thead>
<tbody>
<asp:Repeater ID="rptDonationList" runat="server" OnItemCommand="rptDonationList_ItemCommand">
<ItemTemplate>
<tr>
<td style="width: 10%">
<%# Eval("DONATIONS_ID") %>
</td>
<td style="width: 30%">
<%# Eval("Name") %>
</td>
<td style="width: 30%">
<%# Eval("LU_BANKS_NAME") %>
</td>
<td style="width: 20%">R <%#string.Format("{0:n}",Eval("AMOUNT")).Replace(".00","") %>
</td>
<td style="width: 10%">
<asp:Button ID="btnDonate" Width="70" Height="29" CommandArgument='<%# Eval("AMOUNT") +"|"+Eval("RECEPIENT_USER_ID")+"|"+Eval("DONATIONS_ID")+"|"+Eval("RemainingDonationAmount") %>' CommandName="Donate" CausesValidation="false" runat="server" CssClass="btnred btn-danger" Text="Donate" /></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
When the Button Donate is clicked it fires the OnItemCommand event that is defined like this
<br />
protected void rptDonationList_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "Donate")
{
string[] data = e.CommandArgument.ToString().Split('|');
Session["PaymentAmount"] = data[0];
Session["PaymentforUserId"] = data[1];
Session["DonationId"] = data[2];
Session["RemainingDonationAmount"] = data[3];
Response.Redirect("/MakePayment.aspx",false);
}
}
The problem is when this above event is fired , the page at the bottom left corner shows a message on the status bar "Uploading 10%.." which makes the page to wait until 100% before it moves to another page. What exactly is it uploading as the code above just redirects to the next page.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
10,000 records on one page?! Do you seriously think anyone is going to look through that many records to find the one they want?
If a user can look at and discard one record every second, it would take them almost three hours to look through your list. And that's assuming they don't make a mistake, miss the record they're looking for, and have to start again.
Also, since you're using WebForms, you're going to have an enormous ViewState , which is almost certainly why your page takes so long to load and to post back.
Split the data into pages of a reasonable size, and give the user tools to filter the list to find the record they want.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard
Thanks for your reply. There is paging on the repeater and there is no perfomance issue on the repeater. The only thing that im asking is why does it say "Uploading..." where else in the itemcommand im just assigning some sessions and redirecting?
What i must also mention is that locally connected the online domain it has no issue.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
1. Does the 'upload' happening before, or after the event raised? I think you do not hit the server side until the 'upload' is at 100%, so it somehow related to the postback...
2. Put a sniffer (Fiddler like) to see what actually passing on the lines...
3. how large the ViewState is?
4. It is browser specific? What browser?
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
The Problem has been resolved. This is a good lesson. The problem was that my web application was running in an https IIS server in which my application was using Bootstrap that has fonts which was outside my server with a http not https control. i removed and copied all the files to the local server. So it looked like the system was slow but it was not , there was no error it was just blocking the user from moving forward. i hope this helps someone else
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
Are you saying that mixed content (http/https) was blocking the pages? Browser should have to show a warning about that...
In any case the solution is to create protocol-less links (using cdn is a good thing and in most cases better than local copy)...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Yes i was even shocked when i saw this. The thing the page itself does not timeout or give an error the chrome developer toolbar showed me that the page is blocked due to the mixed content. After moving them locally it started moving like lightning fast.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vimalsoft.com
vuyiswa[at]vimalsoft.com
|
|
|
|
|
How to use store procedure with Entity Framework using class..
and i want to pass that class object to Controller class ..pls help..if someone have any related tutorials please provide..
|
|
|
|
|
|
|
|
|
|
im trying to create a class and thrugh the context call im calling this procedure in to this class..and creating the instance of that class im calling all these methods on controller class..
|
|
|
|
|
|
I've been learning the MS Chart Control. I'm building an asp.net app that will allow our users to design and save charts and have been gradually working my way through the all of the chart elements and properties.
I serialize the chart to an XML file.
Chrt.Serializer.IsResetWhenLoading = False
Chrt.Serializer.Content = SerializationContents.All
Currently I'm stuck on the MapAreas collection. I can create custom MapAreas and have noticed that the MapArea.Coordinates and MapArea.Name properties are not persisted to the XML file when saved using:
Chrt.Serializer.Content = SerializationContents.All
Chrt.Serializer.Save(strPrpPath)
I've searched the net and can't find any posts of this. It seems all MapArea properties except Coordinates and Name are serializable. I'd like to know if these properties are serializable and if so, how to get the Coordinates and Name properties to persist.
|
|
|
|
|
If I have to many pages what method shall I use to control routing to make it reusable one method for each and every url.??
|
|
|
|
|
Personally I use my own url-rewriting routine - like many things, I find writing my own solution easier than trying to get to grips with the out of the box solutions.
If you have "too many url's" I presume your site is database-driven, so store a "friendly url" along with each page's data in the database. The you can capture the incoming request in the Application_BeginRequest method within a global_asax class using Request.Url.ToString and parse that to retrieve the friendly URL from the database then a simple Context.RewritePath([Friendly URL]) does the trick.
[edit] - sorry! That's back to front! You capture the users "friendly url" request and parse that to retrieve the "real" address and then Context.RewritePath([actual URL])
|
|
|
|
|
I would use AppStart/RouteConfig.cs. I assume that you are using MVC.
The following article might give you more ideas.
Routing Basics in ASP.NET MVC[^]
|
|
|
|
|
Can someone please give me a helping hand on this?
We currently have an app that displays name of candidates running for various positions from President, Vice President, Secretary, Treasurer.
The one thing I have been unable to add to it is the radio option for Write In candidate.
The reason the code we use here doesn't allow that option is because it is completely database driven.
The code is too complex and might be confusing to post here but I will be happy to post it if any brave heart wishes to take a look at it.
I was wondering if anyone would be willing to assist with something more manageable.
The code should have the ability to display those positions including write in candidate and hopefully, I will be able to spit a report showing the results in raw number with percentage in parenthesis.
Again, the current report we have does all of these things.
Only thing missing is the ability to display write in candidate information.
Thanks a lot in advance.
|
|
|
|
|
What are you asking us?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a code that displays candidates' positions and names in radio buttons for elections.
For instance:
For President:
Canditate 1
Candidate 2
Candidate 3
Same with vice president, secretary, treasurer, etc
These are generated dynamically from the database. That's how it was originally designed.
What we would like to add is another option on the radio button called Write In candidate.
This way, if voters don't like any of the candidates listed for a particular position, they can check the Write In radio option and write in the candidate of their choice.
Because these radio buttons are dynamically generated, it has made it extremely difficult to add the Write In option.
My question is whether anyone can help with a more manageable code that includes Write In candidate radio option.
If my code is needed, I can post them here but I will be the first to admit that it is messy and confusing.
Hope this clarifies this and thanks.
|
|
|
|
|
samflex wrote: My question is whether anyone can help with a more manageable code that includes Write In candidate radio option. Yes. There are at least 10,000 of us that can and you'll get 10,000 different options.
Where are you stuck?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
<asp:RadioButtonList ID="MyRadioList" runat="server" AppendDataBoundItems="true">
<asp:ListItem Value="" Text="Other" />
</asp:RadioButtonList>
|
|
|
|