|
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.
|
|
|
|
|
Hi,
I have an array like this:
string[3] arr;
arr[0]="ck1";
arr[1]="ck2";, arr[2]= "ck3"..
Now In my aspx page I have 3 checkboxes. Now I want to set the Checkbox text from the array arr values (for the first checbox text as arr[0]. like this) instead of setting the text while declaring the checkboxes.
Thanks in advance.
|
|
|
|
|
there is a read/write property "Text" for checkbox. So what is the problem is setting the text ?
You can set it like
checkbox1.Text = arr[0].ToString()
Ranjith Stephen
|
|
|
|
|
When creating custom control, does it need to be in diffrent project as ddl?
If no then how can i use custom control (Class of custom control is in App_Code folder), within same project.
|
|
|
|