|
Dear All,
I am Ravikumar, I need a help, i am getting a problem when fetching more then 5000 recoreds from database asp.net, its take more time to fetch... i need the Proper coding for fetching bulk data... Please Help Me... i think most of the peoples getting the same problem... so if anyone knows please help.......
Note: data comes from only one or two tables only
Regards Ravi....
Ravikumar
[Coimbatore]
|
|
|
|
|
How can you use / display 5000 records in ASP.Net? You really shouldn't be returning that many records in a web browser there is no way to speed it up, what are you trying to accomplish with that many records?
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
As Todd said that's far too much data to be retrieving. Instead you must find methods to retrieve chunks of smaller sets of data at a time as and only if required by the user in their interface.
If you truly need a lot of data at the server end only then you can cache it at the server, however you should never send that much data out to the client.
Consider using an out of band reqeust (AJAX) to retrieve important portions only, i.e. some sort of paging scheme or a typeahead combo scheme if it's a combo.
In the app I'm working on now, I try to limit each request to no more than 50 rows of data in grids and 20 in combo boxes. Any more and the user can page the grid or combo and it's filled using an out of band ajax request.
|
|
|
|
|
It shouldn't take that long at all unless you have large text or image columns. I have a table with over 17000 rows and I can select all of them except the image column (which holds word documents) and it returns all 17000 in 1 second. However, if I select the file_blob column it takes several minutes.
So my suggestion is if you are selecting those columns, don't. Only select them when you need them. For example, the web app that uses this database only gets the .doc from the database when someone requests to download it.
|
|
|
|
|
I have a dropdownlist and an iframe in a table on .aspx page..
I am trying to select an photoname in the dropdownlist that once selected will make iframe get loaded with that relevant photo which is in some folder not in the database...
here comes the code of it:
<code>
<td vAlign="top" align="center" width="50%">
<asp:dropdownlist id="ddphoto" Width="120" AutoPostBack="True" Runat="server">
<asp:ListItem Value="Abhinay">Abhinaysree</asp:ListItem>
<asp:ListItem Value="Ali">Ali</asp:ListItem>
</asp:dropdownlist>
<iframe class="iframe" id="photoframe" name="photoframe" frameBorder="1" width="150" scrolling="no"
height="150" runat="server"></iframe>
</td>
</code>
-- modified at 10:14 Monday 31st July, 2006
|
|
|
|
|
Hi All,
I have a HTML Form with Text Field and Button.
The HTML Code is like this.
function validate()
{
if(login.txtname.value != "")
{
return true;
}
else
{
alert("Enter Your Name");
return false;
}
}
I have code for button send's click event in my codebehind file.
Now I want to validate txtname filed before submitting the data.
if function return true postback process should start.
otherwise alert message should display.
one more thing i don't want to use .net's validation controls.
|
|
|
|
|
You can change the form as follows:
<form id="login" method="post" onsubmit="return validate();" runat="server">
<input type="text" id="txtname" runat="server">
<input type="submit" id="send" runat="server">
</form>
or change your validate function to
function validate()
{
if(login.txtname.value != "")
{
document.forms[0].submit();
}
else
{
alert("Enter Your Name");
}
}
|
|
|
|
|
I want the browser to automatically add 5000k an hour to my bank account. Any ideas? (yes programmatically)
|
|
|
|
|
In my application there are two user types. Admin and other users.
In admin panel in the user listings I have a requirement which is : when i click a user i shall be seeing that users logged in pages in another window..ie validating that user's credential and enter his section..
The problem is occuring : when I open another users section then that session is overwriting that of mine..
Once the admin click on a user say X and enter his page in another window then immediately hsi(admin) session is getting overwritten by that of X..
Pls suggest some solutions.. Pls note: I am using Session state cookieless= false..which i cant make it true because that hampers security.. pls suggest some solutions other than this..
Thnx n advance
Shouvik
|
|
|
|
|
Well you can't and shouldn't be able to access his session.
I'm sure theres a way to trick the asp engine that you have his session ID, but its a hack at best.
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Hi all
I want suggestions on following scenario
1.I have a image control on the web page.
2. I have FileUpload control
3. Button control to upload file to server
When user will select a .jpg file using file upload control, I want to display that image in the image control. Once user is satisfied with the image, he will upload it to server by clicking on Button control.
I have tried by implementing all events of FileUpload to refresh image control with the user selected image, but nothing worked out. can anyone pls guide me how can I refresh image control when user will select the file using file upload control.
Thanks a lot.
|
|
|
|
|
Save the file in your website and change the src to the location you saved the file.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Or if you are storing the image in a database, you'll have to make a helper page that fetches images (like GetPic.aspx?id=SOMEID), with code like this in the page_load.
<br />
int id = Convert.ToInt32(Request.QueryString["id"]);<br />
<br />
MyPics pic = new MyPics(id);<br />
<br />
Response.ClearContent();<br />
Response.ContentType = "image/jpeg";<br />
Response.OutputStream.Write(pic.Image, 0, pic.Image.Length);<br />
Response.End();<br />
Then after you upload the file, stick it in the database and get the id back you just set the ImageURL property of the asp image controls to "~/GetPic.aspx?id=NEWID" or whatever you called the file.
|
|
|
|
|
Hi There.
I´d like to know, how to pass Ojects like a GUID to a ObjectDataSource via a WebControl. In my case, its a GridView.
The Tableadapter likes to have a GUID but I can only give it simple types. Is there a workarount for that?
Thanks in advance,
Brokit
|
|
|
|
|
Dim policy As Policy
Dim policyToken As Guid
policyToken = Guid.NewGuid
Session.Add(policyToken.ToString, policy)
Response.Redirect("UploadFile.aspx?PolicyToken=" & policyToken.ToString)
==========
postmaster
www.programmingknowledge.com
-- modified at 9:23 Monday 31st July, 2006
|
|
|
|
|
Hello,
I have following code for providing download of file.
byte[] bytes = this.ContentController.GetFileContents(_filePath);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;filename=Document.pdf" );
Response.AddHeader("Content-Length", bytes.Length.ToString());
Response.ContentType = "*/*";
Response.BinaryWrite(bytes);
This provides a messagebox on browser with Open/Save/Cancel button.
When I click on save, this saves the document on the disk, and I can open that.
But when I click on Open, this does not open the document. A prompt from PDF reader says, file not found.
How can I getrid of this problem.
Any help is appreciated.
Thanks in advance.
- ashish
|
|
|
|
|
You could try putting a Response.Flush() at the end of your code there.
|
|
|
|
|
Even after adding Response.Flush() I am getting the same problem.
Additionally, I am haiving this eventhandller written in User control which is placed on a view (Web form). I am also using Masterpage and UIP Application Blocks.
- ashish
|
|
|
|
|
how i can upload only text file using file fild in asp.net 1.1
omi
|
|
|
|
|
you may like to have file type check when you receive the uploaded file.
If incase system receive file other then TEXT, you can reject the file.
Hope this helps you!!!!
- ashish
|
|
|
|
|
How to use FCK Editor in asp.net .can any one give me the example project using FCK Editor
DPM
|
|
|
|
|
hi i have use the FCKEditor in Asp.net.
Have u got the control of FckEditor on Webpage and Wanna to store the value of Fckeditor in Database.
Let me Know may be i help u
byee
|
|
|
|
|
I think that FCKEditor contains some samples, you can learn from them.
Or you can check online documentation: http://wiki.fckeditor.net/
I can not send you my project, as it is not my, but belongs to a company I work for. If you can specify what exactly you would like to know (and didn't find in documentation ), just write it down here and if I know, I'll give you an idea.
Yeah, and another knowledge base can be found on sourceforge: http://sourceforge.net/projects/fckeditor/
Pilo
|
|
|
|
|
Actually i want to know how to use this editor.Brifly want to know how to open a aspx page within the editor only when the administrator wants to edit the page then save it .Where the modified page is saved in a database containing its elements or overie on the server.
when a try to upload a image in localhost it gives an error "XML request error :Internal server error(500)"
Please help
-- modified at 0:52 Tuesday 1st August, 2006
DPM
|
|
|
|
|
heh, you have to create a page, which contains FCKEditor control. On this page u can access content of editor by myFCKEditorControl.Value
creating page: http://wiki.fckeditor.net/Developer%27s_Guide/Integration/ASP.Net
keep in mind, that you have to disable request validation, otherwise .NET framework throws exception, something like 'Potentionly dangerous request' or so. you can do it in web.config, or in <%@ Page ... %> block
Save to a database is your job, just take html from control, wrap it into binary format and save it. Note that images are saved on server.
I don't remember if I saw error like this when developing my FCKEditor application, so I can not help u with it. But at least check if IIS user is allowed to write to a folder which contains images.
Again, I recomend u to read documentation, I gave you links in my previous post. It is very usefull, and I can not help you better.
But if you don't understand something, or can not find it, ask me
Pilo
|
|
|
|