|
Hi
In my application, I need to find the average data transfer rate over the network to show the progress bar, If any one know how to retrieve it in asp.net, kindly reply.
Thanks in Advance
Manoj Kaushik
|
|
|
|
|
Theres no reliable way to get this information short of testing the connection. Obviously you'll get a different answer every time so you'd have to get an average some how. In short, its tricky and if its just for a progress bar don't bother (I don't see any way you could get it to work in this scenario anyway)
|
|
|
|
|
I have quite a complicated problem with the above. I will do my best to explain, although I have a word doc (size 149KB) with the problem explained full with screen shots if any kind person would like me to email this link too I can do...
My Grid View consists of 4 cols:-
1 - ItemTemplate (checkbox)
2 - imageField
3 - ItemTemplate (linkbutton)
4 - ImageField
The data that Im binding too consist of nearly 1000 items and I have paging switched on Pagesize = 200.
Once a user selects an item from the grid, this info is passed to another page.
There are 3 ways in which a user can do this:-
1 -The user clicks col 3 (linkbutton) then col 1 (check box) becomes automatically ticked and the details are passed to another page. This is working fine
2 - The user clicks two checkboxes (col 1) and then clicks col 3 (linkbutton) , but because two other check boxes are already selected and the user has clicked the ‘Col 3’ of one of those items selected, the details of BOTH selected items are passed to another page. This is working fine
3 - This is where I need help If a user clicks on Col 3 (linkButton) and 'other checkboxes' have been ticked (but of different rows to the one which the LinkButton is one) I need to unselect all of the selected check boxes & then auto select the checkbox associated with the clicked linkbutton, then details of this single selected row are then passed to another page. My problem is that some of the checkboxes I have to unselect maybe on different page
If anyone actually understands what I’m trying to do ?! Any help would be most appreciated.
Many thanks,
Janet
|
|
|
|
|
Hi,
You should loop through all the rows of Gridview and find checkbox inside it and uncheck that checkbox in your code.
foreach ( GridViewRow r in gv.Rows )
{
CheckBox chk = ( CheckBox )r.FindControl( "chkid" );
if ( chk.Checked )
{
chk.Checked = false;
}
}
Now the question comes of the checkboxes on the different page of gridview.
That I think u dont need to worry about if u r not maintaining their values during postback.
If u r doing so then you shoul remove all the values from there except the one which u want to keep.
I hope this will help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
hi,
i designed a login page in asp.net with c#.
in that i want to display my result in a popup window, how to create a popup window.
plz help me
jai prakash
|
|
|
|
|
You can use javascript for that. Javascript code for thst is window.open()
You can get the details Here[^]
Apurva Kaushal
|
|
|
|
|
|
if you want popup window on button click event
then,
put this code to Page_Load event
Button1.Attributes["OnClick"] = "javascript:window.open('aspzxpage.aspx','anytext','scrollbars=yes,width=550,height=375,titlebar=yes,toolbar=no,status=no,alwaysLowered=yes,directories=no,hotkeys=no,menubar=no,toolbar=no,resizable=no')";
|
|
|
|
|
hi,
that coding is to create popup window, how i can display my result in that window.
jai prakash
|
|
|
|
|
You would have to point the window to another page that would display the result
|
|
|
|
|
hi,
thanks, i got it
jai prakash
|
|
|
|
|
I want to set the css class of a Table row in a c# code.
The TR attribut is set to runnat="server".
Do good and have good.
|
|
|
|
|
Hi,
r.CssClass = "sss";
Where "r" is and object of TableRow class.
I hope this wil help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
But i m using HTML table and it doesnot give CssClass property in C# file[code behind]
Do good and have good.
|
|
|
|
|
Hi,
You can do this by following.
tbl1.Rows[rowindex].Attributes["class"] = "cssclassname";
here "tbl1" is the id of your HTMLTable and "rowindex" is the index of row in that table.
I hope this will help you.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
i have an excel file, i need to print that file using asp.net...how to do it? plz any one help me...
Pradeep Reddy
|
|
|
|
|
HI,
1. Connect to excel file and get data from it.
2. Display that data in Gridview/Datagrid or in tabular format.
3. Use javascript window.print() to print the content of page.
I hope this will help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
thanks for the reply...
actually iam exporting data to an excel file from datagrid and storing that excel file at server side, now i want to print that excel file by clicking a server button...how to do it?
Pradeep Reddy
|
|
|
|
|
Hi,
I got you requirement but I can not see any direct way to achieve this.
The way I suggest you would be fine for you according to me.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
|
Do you mean to print it on the server or the client? on the client you would have to link to the Excel file so the browser could download it.
|
|
|
|
|
if u save the excel file in certain location then load it in the program when u click the button raise the print event.
I think it will help u
|
|
|
|
|
I am building an asp.net application in which i am sending mails to various people..But the problem is that the mail are going into spam or bulk folders.
Please provide me the right way..or give me correction in my code.. i am giving code which i am using in a console application..
MailMessage newMail = new MailMessage();
newMail.To = "abc@gmail.com"
newMail.From = "panel@rebuscode.com";
newMail.Cc = "";
newMail.Bcc = "";
newMail.BodyFormat = MailFormat.html;
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "mail.rebuscode.com");
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25");
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "pane@rebuscode.com");
newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");
newMail.Subject = "Activate your account.";
newMail.Body = str;
SmtpMail.SmtpServer="mail.rebuscode.com";
SmtpMail.Send(newMail);
hiiiiii
|
|
|
|
|
Is your body text big size?
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|