|
First learn how to format code when you post it here.
I would not use a them and use CSS directly to control the look of the table. That way you can adjust it to better target different browsers as necessary. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i m sorry sir i m actually new it is my second post i think. next time i will write better code. just tell me what is the fix, it will be appreciated. thank you
kami
|
|
|
|
|
You will get no answers until you fix the formatting and comply with the standards here. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
sir tell me what are the standards here on gimme a link where i can read it. i m new here. thank u very much.
kami
|
|
|
|
|
|
I've just been Googling to try and find the answer to this same question, and one of the top links is to this passive-aggressive mess...
Not a very good advert for Codeproject!
So, to help future Googlers:
To remove the rules="all" rendering, you need to change your GridLines="Both" to GridLines="None" on your Gridview.
|
|
|
|
|
Why are you repsonding to this post and what are you talking about? I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks Neil, worked perfectly
Shan Plourde
http://shan-tech.blogspot.com/
|
|
|
|
|
Thanks Neil. Your simple response helped me as well.
P.S. I hope I formatted everything correctly in my reply....
|
|
|
|
|
clsUsers.Username = txtUsername.Text;
clsUsers.Password = clsMd5.getmd5(txtPassword.Text);
DataSet dsuserdetails = clsUsers.selectUserLogin();
if (dsuserdetails.Tables[0].Rows.Count > 0)
{
}
this is the code which i am using to authenticate the user. Problem is when i run in visual studio then everything is fine . But when i checked through online then sometimes it is authenticating and the next moment again if u want to login then it is showing null exception in the if() loop i.e. dsuserdetails dataset is null showing object reference not set to an instance of an object . But the same code runs fine sometimes . I need a instant solution for my problem.
thanks in advance
|
|
|
|
|
praveenkumar_vittaboina wrote: I need a instant solution for my problem.
Don't we all? This is not the way to get an answer to your problem: people do not respond well to demands.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
praveenkumar_vittaboina wrote: I need a instant solution for my problem.
Then don't ask here. Microsoft offers paid support. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The if is a clause, not a loop.
But, I really think the problem in in the selectUserLogin method. Can you show it's code? Isn't there a condition where it returns null like, for example, when one of the parameters is null or empty?
|
|
|
|
|
This call is most likely failing:
DataSet dsuserdetails = clsUsers.selectUserLogin();
If it is, your DataSet may be nothing...or it may contain no tables either of which will cause this line to blow up: if (dsuserdetails.Tables[0].Rows.Count > 0)
So, the bug lies within clsUsers.selectUserLogin(); but you *always* should be checking for null before you *assume* your object(s) are alive.
|
|
|
|
|
Hi
i'm new to MicroSoft Reporting. Can any one tell me how to use chart in the Report. I'm using ASP.Net and C#.Net and back end is Sql Server 2005. I want to display two measurements in the chart. That means a single chart should have two Y- Axis.
Please Help Me...!
Thanks in advance.
|
|
|
|
|
You responded to the question below about SSRS by providing links, yet can't do the same for yourself I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
how to use reporting services in sql server 2005
|
|
|
|
|
|
Hi guys,
Actually im developing a web application on VS2003 framework 1.1, in this application i have several textboxes and one dropdown list box. Now the items in my dropdown listbox gets populated from the database table also i have an insert button on clicking it the datas in the textbox and also the selected item in the dropdown list box gets inserted into my database table. Here comes the issue now in my dropdown listbox say there are 2 items for example --> Tiger, Lion... since here tiger is the first element by default my listbox shows tiger may be from the dropdown list if i select lion it inserts only tiger.. in short my listbox doesnt identify my selected item..
The code is as follows:
private void Button1_Click(object sender, System.EventArgs e)
{
try
{
card = DropDownList1.SelectedItem.Text.ToString();
name = TextBox34.Text;
age = TextBox35.Text;
gender = TextBox36.Text;
con = new SqlConnection();
con.ConnectionString = Session["sqlcon"].ToString();
con.Open();
cmd = new SqlCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "Insert into card_details values('"+Session["User_ID"]+"',getDate(),'"+name+"','"+age+"','"+gender+"','"+card+"')";
cmd.Connection = con;
cmd.ExecuteNonQuery();
cmd.Dispose();
con.Close();
}
catch (Exception exp)
{
Label39.Visible = true;
Label39.Text = "Exception occured review log file for details";
ExceptionHandler.HandleException("Exception",exp);
}
finally
{
if (rdr != null)
{
rdr.Close();
}
if (con != null)
{
con.Close();
con.Dispose();
}
}
}
I really dont know whats wrong in my code do plz help me..
Thanks & Regards,
Tash
|
|
|
|
|
<<tash18>> wrote: whats wrong in my code
Plenty.
name = TextBox34.Text;
First of all you are accepting direct, unvalidated input from user controls that can and will expose your application to SQL inject attacks.
con.ConnectionString = Session["sqlcon"].ToString();
Do not store the connection string in a Session variable. Another security hole and unnecessary. You don't even handle the case where it could be null.
card = DropDownList1.SelectedItem.Text.ToString();
When the button is clicked, whatever the currently selected item in the dropdown is what will be used. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: When the button is clicked, whatever the currently selected item in the dropdown is what will be used.
what ever item i select from the list box only the 1st element in the listbox gets inserted... may be if i select 5th item in the list and click the insert button the first element in the list gets inserted... why does that happen.. im confused...
|
|
|
|
|
Is AutoPostBack property set to true? Naina
|
|
|
|
|
Thanx my issue was with postback.. thanx a lot...
|
|
|
|
|
It sounds like you are populating the listbox but not taking PostBack into account.
Wherever it is you are binding the data surround the code with:
if (!PostBack)
{
... code to bind listbox to data.
}
otherwise every time you hit the button the listbox gets repopulated and you will always get the first item in the list as your value.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|