|
for (int i = 0; i < GridView1.Rows.Count; i++)
{
CheckBox ck=(CheckBox)GridView1.Rows[i].Controls[0];
if(!ck.Check)
{
GridView1.Rows[i].visible=false;
}
}
modified 27-May-14 4:38am.
|
|
|
|
|
Dear All,
I am exporting grid view to excel using following code
void Export()
{
string attachment = "attachment; filename=Contacts.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
GridView1.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
but what happens, It exports all the control to excel. I have button, listbox and other controls above my GridView but when exporting I want to export only my gridview to Excel
using above code all the page is exported,
any ideas how to export only gridview to excel?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Your code looks clean to me. It should work. Have you overridden VerifyRenderingInServerForm method?
public override void VerifyRenderingInServerForm(Control control)
{
}
|
|
|
|
|
I have already done that but no success.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
thanks for your reply.
I have done the same thing, but all controls within the page are rendered and exported to excel file.
I want to export only the gridview not other controls.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Im looking for a interactive gannt control for my web app (something that mimics MS Project)
the only half decent control ive found is
http://www.plexityhide.com/[^]
but wanted to see it anyone else uses anything better?
thanks
|
|
|
|
|
Have a look on [Component Source]. You can usually download trail versions on components, to try before you buy.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Hello,
In my website I am maintaining log of users in which I am storing some user's information such as user machine IP number,SessionId,UserName etc.and able to show the list of current and past users in webpage.
I want to share a browser session of my current users.suppose there are many users who is accesing my site and if I click any perticular user then we can find the user's session and able to know the working of users.
Is it possiable,if yes then how ?
Please tell me......
Thanks to all.
modified on Tuesday, April 6, 2010 4:01 AM
|
|
|
|
|
Samarjeet Singh@india wrote: I want to share a browser session of my current users.suppose there are many users who is accesing my site and if I click any perticular user then we can find the user's session and able to know the working of users.
You cannot share other user's information from one session. May be try using Application object which can be shared across the users.
|
|
|
|
|
hmmmmmmmmmmmm,
I am not very sure but I heared that some shopping site have sites where we shop on, and they can have people join you session and drive it and user sees you moving around driving it.
Thanks to Reply.
|
|
|
|
|
In that case you have to write your own Session Management. Simple way is maintaining a static or shared object.
|
|
|
|
|
Hi ,
I am hosting web site on IIS 7 on windows vista operating system.I am getting
HTTP Error 500.19 - Internal Server how to fix this issue.
Thanks and regards,
Amit Patel
|
|
|
|
|
|
Try to run application under IIS_IUSRs user or Put your publish code into C:\Inetpub\wwwroot\ folder.
|
|
|
|
|
Hi Everyone,
My menu is looking like following,
<a class="menu"; href="page1.aspx"; title="Page1"> Page1 </a>
<a class="menu"; href="page2.aspx"; title="page2"> page2 </a>
<a class="menu"; href="page3.aspx"; title="page3"> page3 </a>
Now i want to disable page3 menu.
how to do it...
any help will be appriciated...
thanks...
G.Paulraj
|
|
|
|
|
Try this,
<a class="menu" href="page3.aspx" title="page3" disabled="disabled"> page3 </a>
|
|
|
|
|
Hi Arun Jacob,
Its working in Internet Explorere. but not working in other browser(Opera).
G.Paulraj
|
|
|
|
|
Okay then either remove href attribute or set onclick="return false;"
|
|
|
|
|
Hi all,
Iam working on Forum Application and every thing is ok but iam stuck on below that how i set the thread hit counter for Total Views and Total replies of the particular thread.
Any Idea how i tackle this issue.
Hope Hear from you
Best Regards
|
|
|
|
|
If you are keeping a DB table, you will get the total replies by querying the table for this particular thread.For Total views you can set a field in the table and increment it each time that page is accessed.
|
|
|
|
|
Hi,
Asp.Net prepared by pressing a button on a page I've written an e-mail address and mail is being taken. Russian characters are thrown in the mail. Ta outlook but these characters??? comes in the form. I changed the regional language settings, default outlook did russian language, the web config file the necessary global ayarlarınıda I wrote in an e-mail format to set charset for russian characters, but I did not work. code is as follows :
MailMessage msgMail = new MailMessage();
msgMail.From = "mail@mail.com";
msgMail.To = TextBox3.Text;
msgMail.Subject = "Konu";
msgMail.BodyFormat = MailFormat.Html;
msgMail.Priority = MailPriority.High;
string body = "";
body += "";
body += "Уваж" + TextBox1.Text + " " + TextBox2.Text + " ";
body += "Ваш эксклюзивный код для получе" + kuponkod + " ";
body +="Насла" + " ";
body +="жением ";
body += "всю стоим упки. Скид раз. енежного экви упки. ватель прия испол ";
body += " ";
msgMail.Body=body;
Can you help me?
thanks.
|
|
|
|
|
i hava question bank and option bank table i want to show paper to user
i will show question and option one at a time so which method i will follow
|
|
|
|
|
Do some requirement analysis and some R&D,You'll get solution..
|
|
|
|
|
Hi,
I have an asp.net button (Ex: Submit). I need an alert box with "Custom title" when onclientclick of the submit button. I know that it is not possible to have title for javascript alert. But please tell me some alternate solution for this problem.
Thanks.
With Regards,
Anand
|
|
|
|