|
hi Tirthadip
but on html control we con't use hash table because we con' write vb code on html control
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
I used the below code to Export my gridview to excel. I have paging set to true. I am facing 2 problems. (1)Error: RegisterForEventValidation can only be called during Render(). This error got resolved when I turned the EventValidation to false. This could be a security risk. Can u help me with this? (2) After the 1st problem is resolved temporarily, the next problem is that the entire DataSet doesn't get exported. Only the current page gets exported. I need paging, so is there a way where I can get the entire DataSet which is bound to the gridview control exported to excel . Please help....Let me know if you need any of my code snippet. Thanks..
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=Test.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
GridView1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End()
I have got the Idea from here[^] for my Qn. #1
-- modified at 7:44 Friday 6th July, 2007
Jey
|
|
|
|
|
Did u use VerifyRenderingInServerForm() ??
|
|
|
|
|
1) I have already tried that one.
public override void VerifyRenderingInServerForm(Control control)
{
}
2) Tried like below also.
//Create a form to contain the grid
HtmlForm frm = new HtmlForm();
GridView1.Parent.Controls.Add(frm);
frm.Attributes["runat"] = "server";
frm.Controls.Add(GridView1);
frm.RenderControl(htmlWrite);
Regards,
Jay
|
|
|
|
|
Comment Response.Charset = "" & try again....
|
|
|
|
|
Same Error
Regards,
Jay
|
|
|
|
|
but that piece of code worked fine for me...
|
|
|
|
|
Hi,
I want to round double to whole number i.e. 123.50 to 124.00 . If I am using Math.Round it will give 123.00. So what else can be done???
|
|
|
|
|
using Math.Ceiling will help u out
rahul
|
|
|
|
|
Thanks Rahul,
I had tried Math.Ceiling
But It will also give me 123.20 to 124.00
I want this scenario
if 123.45 then 123.00
if 123.50 then 124.00
if 123.67 then 124.00
Help me for the same.
Thanks.
|
|
|
|
|
I had tried Math.Ceiling
But It will also give me 123.20 to 124.00
I want this scenario
if 123.45 then 123.00
if 123.50 then 124.00
if 123.67 then 124.00
Help me for the same.
|
|
|
|
|
I have created some flash button with some effect and save it .swf . I used ImageButton and connect with the url address but it doesnt work.
Is their any other way I can do it
Sarfarj Ahmed
|
|
|
|
|
hey Navaneeth. kahen bhaiya kahe ka gusha ho rahe ho.....
it social networking sight where people meet and exchange her view .so koi bhi kahin likh sakata hai ok my dear
galti to sabse hoti hai yaar
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
What is this?
Regards,
Satips.
|
|
|
|
|
its not for u man ,its indian mashala .where u from ?
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Chennai in south India.
Regards,
Satips.
|
|
|
|
|
hello brother this is not an asp.net question. Please ask only asp.net related questions here
Regards,
Sylvester G
|
|
|
|
|
Well said Sylvester
Regards,
Satips.
|
|
|
|
|
hi friends
i have a problem in web based cheating application where we using a chat window of with scrollbar,i wana scroll bar always at bottom and i have done, but prblm is that i am using a hash table for coming msg.hash table work on btn click through javascript timer.prblm come when the btn click post back occerd so i wanat any control which not fierd postback and have click event
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Piyush Vardhan Singh wrote: web based cheating application
it is chat Application.
Regards,
Satips.
|
|
|
|
|
ya its chat application in asp.net
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Hi i posted this msg already...,
Our members also said some answers...,
But still i didn t get proper answer...,
So,I am post one more time...,
Plz give me some solution for this probs...,
I am trying to display my grid cell value in grid textbox...,
So i used this following code...,
For Each fillgrdregtextbox As DataGridItem In dgrdmain1.Items
Dim AppRgHrs As TextBox = CType(fillgrdregtextbox.FindControl("txtAppRgHrs"), TextBox)
Dim AppOtHrs As TextBox = CType(fillgrdregtextbox.FindControl("txtAppOtHrs"), TextBox)
If fillgrdregtextbox.Cells(25).Text <> "" Then
AppRgHrs.Text = Val(fillgrdregtextbox.Cells(25).Text)
AppOtHrs.Text = Val(fillgrdregtextbox.Cells(26).Text)
ElseIf fillgrdregtextbox.Cells(27).Text <> "" Then
AppRgHrs.Text = Val(fillgrdregtextbox.Cells(27).Text)
AppOtHrs.Text = Val(fillgrdregtextbox.Cells(28).Text)Else
AppRgHrs.Text = 0
AppOtHrs.Text = 0
End If
Next
In this that first if condition is working...,
But that elseif is not working...,(Mentioned in bold)
Instead of that i am getting 0 on there...,
how to solve it...,
Plz tell me...,
Advance thanks...,
Regards,
Magi
|
|
|
|
|
right click on datagrid and select auto format and do what u want
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Its not like that..,
i need that execution time...,
I got that answer...,
For Each Maingrd As DataGridItem In dgrdmain1.Items
if(condition)
maingrd.backcolor=color.red
end if
This way we can change the row color.....,
Anyway thanks for ur help...,
Keep in touch,
Regards,
Magi
|
|
|
|
|
Hi.
Does anyone know how to remove/clear a certain value/key from a querystring?
Request.QueryString.Clear(); AND Request.QueryString.Remove(key); , do not work as the error states that QS is read only?
I do want to do the response.redirect("test.aspx?q=''") thing, as my it will not work for my situation.
Any help would be appreciated.
Thanks
M
|
|
|
|