|
|
That is cool, but I'm not using it for that reason, really.
The idea behind the project is a list of messages to be displayed on a crawl running on the bottom of the screen, therefore order is important. I want to force the user to SELECT a row before editing or deleting it because I need to capture the INDEX of the message so I can alter each message's index that comes after.
For example, 5 messages
INDEX
1
2
3
4
5
if I delete 3, 4 would need to become 3 and 5 become 4.
Using C# the only way I found to get that information is by using the SelectedValue property of MyGridView. Unless there's another way...?
|
|
|
|
|
I have a webservice that takes a byte[] parameter and writes it out to the filesystem. The byte[] is about 120k in length (on average). The webservice can be hit about 20x per minute (so that puts it at about 2.5mb/min). The system administrator is saying this service is causing bottlenecks and other web services/web apps are also failing as a result. He suggest that i change the code to speed up the webservice because it's using up too much resources.
The code is pretty straight forward. I don't understand how this webservice is breaking the other applications/services. I was under the impression that the resource management (thread managment, memory manamgement) is all done under IIS not in the code behind. If i'm not correct what could i possibly do (either in the web.config or code behind) to prevent this from happening. Someone suggested that i monitor the threads in the webservice but that really doesn't make sense to me. I'm totally confused on this subject.
Thanks,
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
well it happens sometimes to send lots of data to the webservice and also return a lot. Try to check if you are not sending or receiving any unnecessary data.
Also for your webservice, each time it is called the web server spawns a new thread and runs it. Try not to open any new thread from the web service if not absolutely necessary.
And in IIS host the webservice in a new application pool.
|
|
|
|
|
thanks for the info!
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
hello everyone
In my project i have a problem.
I want to read a text file(.doc,.xls,.txt) and then
create & write a pdf file from that file in asp.net 2.0 using C#.
I want to use only free dll/software/third party tool except
trial version.
Please help me..
|
|
|
|
|
narendra_roy wrote: I want to use only free dll/software/third party tool except
trial version.
OK, then that's what you need to do. Of course, the paid projects will have better support, but there's some PDF libraries on source forge. If you can't use google, I doubt you'll be able to use a library that doesn't come with good support.
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.
|
|
|
|
|
use iTextSharp... it is free to distribute and easy to use.
|
|
|
|
|
Hi Friends,
I am using visual studio 2008 and i have to create video gallery page. i am uploading videos(.flv) to my web server. Now i want to upload any format of video file. And it will convert into automatically .flv format(like youtube file upload). if anyone know? Please send me the solution.
Regards,
Kishore
|
|
|
|
|
You obviously need to buy a component that converts videos to flv. I don't think that DirectX can be used, but if it can, then you'd still need to buy a filter to do it.
This question has nothing to do with ASP.NET
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.
|
|
|
|
|
hi all
im display some data asynchronously im home page (Form A),so i retrieve bunch of HTML of code from separate ASPX form (Form B),from (Form B) im having A tag and i have define event onserverClick there, but its not fire when its retrieve from the Form A, how can i fire that event, is there any different way to fire the server side event.
Please help me to do this,
Thanks
|
|
|
|
|
onserverClick will be called on click event else you have an option to call it by own.So I think when at your home page,you get the data then call it.
Cheers!!
Brij
|
|
|
|
|
hi
my code is like this
outputText += "";
outputText += "";
protected void lnk_Click(object sender, EventArgs e)
{
}
so this is not fire, could help me to fire this event.
|
|
|
|
|
where you have assigned this event lnk_Click on aspx page
Cheers!!
Brij
|
|
|
|
|
hi
i solved my problem, i have put href for A tag with query string, from redirect page i retrieve that query string and do other stuff,
when u put onclick also it wasn't work for me
Thanks
|
|
|
|
|
Hello,
I am trying to get the data from a cell in a GridView. I am using the following RowCommand event to do this.
protected void GridViewResults_RowCommand(object sender, GridViewCommandEventArgs e)
{
GridViewRow gvr = GridViewResults.Rows[Convert.ToInt32(e.CommandArgument)];
string pdf = gvr.Cells[6].Text;
}
An exception is thrown on the first line of code. Debugging this line shows that the code does return the selected row number as the command argument, however, it also returns the following error:
ArguementOutOfRangeException:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
I am confused about which index is returning the error! The only index I am aware of from this line of code is the number of rows in the grid, and that number is returned correctly regardless of the users row selection (as checked in the debugger) and is always non negative. I have been 3 days and all over the Internet trying to get an answer to this. ANY assistance is greatly appreciated.
Thank you for your time, Pat
|
|
|
|
|
Try to get the text as below
e.Row.Cells[index].Text
index: it is the cell index and starts from zero
Cheers!!
Brij
|
|
|
|
|
Brij,
Thank you for the quick reply. I applied your code as follows. Below is the complete error message returned:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
Line 476: protected void GridViewResults_RowCommand(object sender, GridViewCommandEventArgs e)
Line 477: {
Line 478: string pdf = GridViewResults.Rows[Convert.ToInt32(e.CommandArgument)].Cells[6].Text;
I have also reduced the Cells value to [1] (there are 7 columns) just to make sure that I was not out of the Cell column range. I am a bit surprised that there is no "text overload" as an option as there is in C# desk application. The error is the same. Please let me know if you have any other ideas or if I am applying your code incorrectly. Thank you again for your input. I really need to get this done today.
Best Regards, Pat
|
|
|
|
|
Can you post your gridview control's code that is in aspx page?
Cheers!!
Brij
|
|
|
|
|
Yes, Absolutely.....
<asp:GridView ID="GridViewResults" runat="server" CssClass="gridViewSpecs"
HeaderStyle-Height="30px" Height="100px" Width="770px" BackColor="White"
RowStyle-Height="25px" onrowcommand="GridViewResults_RowCommand">
<RowStyle Height="25px" />
<HeaderStyle Height="30px"></HeaderStyle>
<HeaderStyle BackColor="#CCCCCC" />
<Columns >
<asp:buttonfield
commandname="getPdf"
Text="Select" HeaderImageUrl="~/Graphics/adobe2.PNG" />
</Columns>
</asp:GridView>
Thank you again for your follow up.. ...MUCH appreciated!
Pat
|
|
|
|
|
Hello Pat
Instead of using
GridViewRow gvr = GridViewResults.Rows[Convert.ToInt32(e.CommandArgument)];
string pdf = gvr.Cells[6].Text;
use
Button button= (Button)e.Row.Cells[0].Controls[0];
as you are having button in column 0.
let me know when done
Cheers!!
Brij
|
|
|
|
|
Hi Brij,
Well, this is one that I have never seen before (perhaps I am leading a sheltered life...?.. .
OK, I put that in and got this new error:
Compiler Error Message: CS1061: 'System.Web.UI.WebControls.GridViewCommandEventArgs' does not contain a definition for 'Row' and no extension method 'Row' accepting a first argument of type 'System.Web.UI.WebControls.GridViewCommandEventArgs' could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 481: if (e.CommandName.Equals("getPdf"))
Line 482: {
Line 483: Button button = (Button)e.Row.Cells[0].Controls[0];
Line 484:
Line 485:
Could I be missing a using directive for this to compile?. Below is a copy of the using directives for this page:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Data;
using System.Diagnostics;
Thanks Brij...Pat
|
|
|
|
|
|
Hi all,
I want to use jquery for making the picture zoom,how can i do it.
Thanks in advance.
|
|
|
|
|