|
You cast the Master property to an instance of your master page derived class and access it's properties from there.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How can i retrieve the ?id, error always is parameter is missing?
code below
###########################################
MySqlConnection conn = new MySqlConnection("server=192.168.10.1;database=test;user id=test;password=test;");
conn.Open();
MySqlCommand comm = new MySqlCommand("LOCK TABLES profile WRITE", conn);
comm.ExecuteNonQuery();
comm = new MySqlCommand(String.Format("SELECT * from profile where id = ?id"), conn);
MySqlDataReader reader = comm.ExecuteReader();
int retrievedId = reader.GetInt32("id");
//comm.Parameters.Add("?id", retrievedId);
comm.Parameters.Add("id", MySqlDbType.Int32).Value = retrievedId.id;
DataTable myDataTable = new DataTable();
myDataTable.Load(reader);
reader.Close();
DetailsView1.DataSource = myDataTable;
DetailsView1.DataBind();
DetailsView1.Dispose();
comm = new MySqlCommand("UNLOCK TABLES", conn);
comm.ExecuteNonQuery();
conn.Close();
DetailsView1.Dispose();
###########################################
Thanks
|
|
|
|
|
Looks to me like you should be writing a stored proc to do this all in one.
Where does ?id get turned into a number, I don't see it. It looks to me like you get your error because you never add your parameter, which is what it says.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
in this line
comm = new MySqlCommand(String.Format("SELECT * from profile where id = ?id"), conn);
?id is wont make sence. id value is missing check it out
Ramana
|
|
|
|
|
I have this two pages
- profiles
1. Default.aspx -- list all profiles
2. Details.aspx -- detail of a profile
i am transfering data via _GET - Details.aspx?id={0} (ex: ?id=732)
Now: comm = new MySqlCommand(String.Format("SELECT * from profile where id = ?id"), conn);
I don't know how to add properly a parameter for ?id. I mean, how can i retrieve it properly?
|
|
|
|
|
use Request.QueryString to get querystring value...
<br />
comm = new MySqlCommand("SELECT * from profile where id =" + Request.QueryString["id"].ToString(), conn);<br />
but u have check null check condition for Request.QueryString("id")
Ramana
|
|
|
|
|
oh my.. i totally forgot this..
thanks Ramana, this is what im looking for and this solves my problem.
Yes, i will be checking the id if its empty.
I just need something as easy as this to keep me going, its been frustrating already.
Thanks,
Louie
|
|
|
|
|
Well, the first step would be to be aware that you need to do that, I mean, did you think it would just find it's way there ? The command object has a Parameters collection, you add the value to that, once you've pulled it from the query string.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ASP.NET,I can't do a page about Select Folder Dialog.So want your can help me! Thanks!
|
|
|
|
|
Correct, you can't.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dear All,
I am using a gridview in my asp.net application which is having an edit Item template as well as an Item template. Each of the template is having about 50 controls in which three are combo boxes which are populated from sqldatasource. I use this gridview for edit update delete operations.
My problem is that , when I am having about 10 rows my gridview is almost freezing when doing edit update operations. I commented all the source codes thet I have in code behind class, but no use. Do the rendering take this much time ? Can anyone please give me some tips for speeding up my operations. I need to use this type of gridview in many places in my application. Please help..
Thanks in advance
Ranjith Stephen
|
|
|
|
|
aviod DB trips, i.e., very first time retrieve the data & store in dataset. user this only one dataset.
as per the u r requirement, avoid the database trips.
Ramana
|
|
|
|
|
Hii
Thanx for the reply.
The gridview is associated with an sqldatasource. As per your reply, is it making the gridview slow ??
Ranjith Stephen
|
|
|
|
|
use dataset instead of sqldatasource, defenetly i will imporve ur performance
Ramana
|
|
|
|
|
OK.. thanks I will try that way..
And also I found another thing.
I am showing the gridview in a div with scroll bars. When I turned the paging option on in gridview ,it helped the situation very much and I found the operations being faster.
Anyways thank you very much for your precious opinion ..
Ranjith Stephen
|
|
|
|
|
I have an application that retreives records from a database, which will be displayed in a datagridview. Moreover, I would also generate a csv file from that query and allow user to save it. I have a code that save a csv file but I don`t have a code on how to generate a csv from database records. How will I do that? Is any body here who can help me. Much appreciated if somebody will give me a link or code.
Thanks in advance,
C#Coudou;)
******************************
I just want to
know everything
|
|
|
|
|
can u give the DataBase table structure ?
Ramana
|
|
|
|
|
Hi,
I developed one user control which contain 3 check boxes. Now Checkbox3 is enabled only Checkbo1 and 2 are checked. I want to enable the Checkbox3 by using the JavaScript by checking whether checkbo1 and 2 checked or not.
Can anyone help me on this.
Thanks in advance
|
|
|
|
|
This is javascrpt 101, the main thing is you need to write script that creates variables that contain the client side names of the checkboxes.
What else do you need help with ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all,
Pls does anyone here have an idea how I can reduce the default session timeout in my web application? (I am using dotnetnuke)
Thanks!
|
|
|
|
|
In web.config
<system.web>
<sessionState timeout="30"/>
</system.web>
Ranjith Stephen
|
|
|
|
|
|
I just need ASP registration page with MS Access database and dsn file
but put the mdb file in folder name data
thanks for all
bbbbginer
|
|
|
|
|
Read "How to get an answer to your question"
only two letters away from being an asset
|
|
|
|
|
You probably would have to modify connection string, to point it to mdb file.
|
|
|
|