|
Hallo.
Either I am a noob, or something strange is going on .
I have got an ASP.net webform , on this form I have a object datasource ( which is linked to my class).
When I add a form view to the form and link it to my object datasource the template is not generated for me. I need to manually build the template. It is if the formview does not see the objectdatasources select,insert etc commands. The class I am linking to, does work.
please help, i think somewhere I am missing a property or something.
kind regards
J0hn 0 C0nn3 r
|
|
|
|
|
Try the ASP.NEt forum...
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Something weird was not wrong it was the latter. I tried to bind a list of objects to formview, and apparantly this is not possible...
he he
|
|
|
|
|
hi all,
i want to use " Registory on Target machine " option using vs.net 2005 (c# windows)in Setup and deployment while setup file creation,and how can i put keys and string values,how to use this option ,please explain it.
Thanks &Regards,
vishnu.
|
|
|
|
|
Hi,
I am new to this forum and also to the C# and .Net environment.
I am exporting the data grid to the excel sheet,but the problem is the reports are displayed twice in the excel sheet i am not getting where the error might be...pls can sm one help me out.
Thanks
Annu
|
|
|
|
|
Sorry, I've left my psychic head at home.
How can anyone help without seeing your code?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hello here is my code...
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.ContentType = "application/ms-excel";
Response.AddHeader("content-disposition", "attachment;filename=Daily.xls");
Response.Charset = "";
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
tb.RenderControl(hw);
Response.Write(sw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control Control)
{
return;
}
|
|
|
|
|
Is there any error in my code..???
|
|
|
|
|
GridView gwTemp = new GridView();
gwTemp.Datasource = dtData; // assign the data from your gridview object
Response.Clear();
Response.Buffer = true;
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment;filename=HelpDesk_Report.xls");
Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htw = new HtmlTextWriter(sw);
gwTemp.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
|
|
|
|
|
Hi,Here is my code its i think almost similar..
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.ContentType = "application/ms-excel";
Response.AddHeader("content-disposition", "attachment;filename=Daily.xls");
Response.Charset = "";
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
tb.RenderControl(hw);
Response.Write(sw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control Control)
{
return;
}
I am displaying my grid view first in a web page and on click of a link its being exported..to excel
|
|
|
|
|
Hi.
Im using Bitmap to Draw the graphs using GDI+ objects, every time while loading the new graph the "PF usage" (memory size) keeps adding by 20 or even more.. how to destroy the current instance of a GDI+ object used to draw a graph or how to re-use the same Bitmap to draw new graph keeping the memory size constant.
please help me out ni this asap.
regards
vinayskvs
|
|
|
|
|
Call Dispose when you finish with a bitmap to clean up it's memory usage.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
Did you read Christian's reply? Are you disposing your bitmaps?
Memory is managed by the framework - you can't expect the memory use
to go back to what it was before you create an object.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi all,
I have written a windows service which will delete the files from the respective folder.
Now I want to make my service only to run at every day night 8.00PM.
How to achieve above?
Kindly guide me...since new to these concepts
Thanks In Advance
|
|
|
|
|
|
Create a thread in the service that waits until the specified time every day, and the performs its processing.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
CrystalReportViewer control is disable in the Toolbox.How to make it enable (.Net2.0)
|
|
|
|
|
If you have selected Crystal Reports Application while creating the project I believe that you should have the viewer as enabled by default.
But if you have started with Windows Application, I can suggest you to make sure that your solution has a reference to Crystal Reports Engine.
Regards,
Always keep the Murphy Rules in mind!
|
|
|
|
|
hi i am new user of asp.net using c#
in master page there is a datalist in a panel which is filled by category table. but problem is that data goes out from panel. when i use content place holder then problem is that datalist is not filled nullvalue exception given. if i use iframe to solve this problem than problem is that when i click datalist link button to show another information than that show in that i frame not in other portion.
how i solver this problem.
thanks in advance.
|
|
|
|
|
umeshdaiya wrote: hi i am new user of asp.net using c#
OK. Obviously also a new user of this website. You asked in the ASP.NET forum, I think. Don't ask here, this is for non ASP.NET questions.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi, i've got a real problem with my login page.. It logs in the first time but when i log out and log in again. I get the following error:
System.InvalidOperationException: The connection was not closed. The connection's current state is open.
Here is my code:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Web.Configuration;
public partial class login : System.Web.UI.Page
{
static String connectionString = WebConfigurationManager.ConnectionStrings["AEConnection"].ConnectionString;
static SqlConnection AEConnection = new SqlConnection(connectionString);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
String mysql = "select * from AELogin where username ='" + txt_Login.Text + "' and password = '" + txt_Pass.Text + "'";
SqlDataReader dr;
SqlCommand cmdLogin = new SqlCommand(mysql, AEConnection);
AEConnection.Open();
dr = cmdLogin.ExecuteReader();
if (txt_Login.Text == "" | txt_Pass.Text == "") {
Label1.Text = "Please make sure both your Username and Password are entered";
}
else if (dr.Read() == true) {
if (System.Convert.ToInt32(dr["alevel"]) == 1)
{
Session["accesslevel"] = "1";
Response.Redirect("adminHome.aspx");
}
else if (System.Convert.ToInt32(dr["alevel"]) == 2)
{
Session["accesslevel"] = "2";
Response.Redirect("guestHome.aspx");
}
}
else {
Label1.Text = "Wrong info";
Response.Redirect("Error.aspx");
}
AEConnection.Close();
dr.Close();
}
}
Hope that somebody could enlighten me on this situation as i've been stuck here for quite awhile and have yet to find a solution
thanks alot!
|
|
|
|
|
post it to asp.net forum
cheers,
Abhijit
|
|
|
|
|
use try,catch and finally statement
Raaj
|
|
|
|