|
Got the Error:
You us e a DataReader object instead of a DataTable object.
The reader will give up data per row until there is no more to give.
After loading a datareader you ask 2 things
if (moSqlDataReader.HasRows)
{
WHILE (moSqlDataReader.Read())
{
// your code here
}
}
in your case it is better to do a
DataSet dSet = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter("Query", con);
adapter.SelectCommand.CommandType = CommandType.Text;
etc ..
adapter.Fill(dSet);
|
|
|
|
|
Double check your query is correct and maybe try another simple query and load that
this will eliminate the possibility that it is your query which is the problem
or it will highlight what the problem is
|
|
|
|
|
Have you declared moSqlDataReader ?
|
|
|
|
|
anybody knows a complete article about "Membership and Role Management" in asp .net 2 or 3.5 for “MS SQL Server”?
an article that describes the whole process completely?
i already searched for it but they were confusing!
thank you
|
|
|
|
|
http://aspnet.4guysfromrolla.com/articles/120705-1.aspx
|
|
|
|
|
Hi..
im using session variables to store the login information of the user..
When user login and logout he cant review the pages he visited, its working fine ...
but if another user login's he can see all the pages visited by the previous user by clicking back button. Since session ID is not null it allows the page to appear..
Can u tell me how to remove all browser list on Logout..
thanks in advance
|
|
|
|
|
I dont think you can delete the browser history, you can delete sessions when you logout, is this what you mean?
|
|
|
|
|
Edit your posts, don't double post.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Try preventing the page from being cached. Use the following at the top of the aspx page.
<%
Response.CacheControl = "no-cache";
Response.AppendHeader("Pragma", "no-cache");
Response.Expires = -1;
%>
|
|
|
|
|
Hi..
im using session variables to store the login information of the user..
When user login and logout he cant review the pages he visited, its working fine ...
but if another user login's he can see all the pages visited by the previous user by clicking back button. Since session ID is not null it allows the page to appear..
Can u tell me how to remove all browser list on Logout..
thanks in advance
|
|
|
|
|
If you're using session variables, I don't see how that is possible.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello friends,
I want to give a message to the user in a alert format that your data has been saved successfully after saving data.
But i am unable to do this........
Please help me i am also using ajax updatepanel......
Thanks in advance........
Deepak Nigam
|
|
|
|
|
Tis is a web app, so message boxes need to me javascript, namely the alert command. You can emit script using the RegisterClientScriptBlock metod from you code behind, or write client side code to show it in response to AJAX calls
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello Christian,
I am getting the following error "The Message recived from the server could not be parsed. Common causes for this error are the response is modifiyed ba calls to response.write(), response details , HttpModule, OR server trace is enabled.
As i am using the this inside a updatepanel.
I got this solution but confused that how to use this
ScriptManager.RegisterStartupScript(Me, Me.GetType, "key", "open('" + filename + "');", True)
I have a MessageBox Class that is working well with the simple forms......
Deepak Nigam
|
|
|
|
|
OK, perhaps you need to write client side script to handle this, if you are using the ASP.NET AJAX library as well, I don't know, I don't really use it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Do you have trace on? Ajax controls do not work with trace enabled. It's a bug I have experienced myself.
Broken Bokken
http://www.brokenbokken.com
|
|
|
|
|
Hello Deepak ..
I'm Arun Vijay . I hope Below Code will Help You.
Write Below In HTML source.
function confirm()
{
else
return false;
}
Ans This One in CodeBehind '.cs'
ButtonName.Attributes.Add("onclick","return confirm('ENTER YOUR MSG')");
ArunVijay
|
|
|
|
|
All you need to do is call this function afer u save ur data..
eg..
SaveData()
{
your insert code here....
.....
Show_Msg();
}
Sub Show_Msg()
Dim scp As String = "alert('Data Saved Successfully ');"
ClientScript.RegisterClientScriptBlock(Me.GetType(), "script1", scp)
End Sub
When you fail to plan, you are planning to fail.
|
|
|
|
|
RequiredFieldValidator validator = new RequiredFieldValidator();
Table t = new Table();
TableCell c = new TableCell();
TableRow r = new TableRow();
validator.ControlToValidate = "TextBox1";
validator.ErrorMessage = "*";
validator.EnableViewState = true;
validator.EnableClientScript = true;
//Page.Validators.Add(validator);
validator.Display = ValidatorDisplay.Dynamic;
validator.EnableTheming = true;
validator.Enabled = true;
c.Controls.Add(validator);
r.Controls.Add(c);
t.Controls.Add(r);
Wizard1.Controls.Add(t);
i write this code but it dose not work. do any body what should i do?
|
|
|
|
|
Well, unless you add this before page load, it's not going to have any viewstate, that's for certain. Why create a table with one cell in it ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i write this code in webpart. when i add it to cell i see error in runtime. and when i trace it i have no error. but my code doesnt run.
|
|
|
|
|
how to compare two table content in asp.net
|
|
|
|
|
IF they are in the same data source, best way is in the DB. Either way, ASP.NET has nothing to do with comparing data, although C# and VB.NET can do it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
bkarthikeyansjcmca@gmail.com wrote: how to compare two table content in asp.net
Your question doesn't made any sense to me, consider explaining it.
|
|
|
|
|
Hello Friend
... R u want to compare two fields in two tables are you want compare complete two tables.
To Compare Two fields will give solution
ArunVijay
|
|
|
|