|
ThanQ
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Hello,
I am bringing a table through a data grid. I Want user can update or delete the data through the grid by clicking a button.
i have loaded the data into the grid but i am unable to make the rows editable,so that user can delete or update it.
Is there any example for this? I am using visual basic asp.net and oracle database.
Thanks,
|
|
|
|
|
prachishah wrote: am unable to make the rows editable
You can use TemplateColumn to make the row editable. Datagrid comes with SelectCommand,EditCommand events. Do the database updation in these events
|
|
|
|
|
Hi all,
how shall we retrieve the selected text of a textbox control in ASP.Net.. is there any possibilities in doing that..
Regards
Sivan.G
|
|
|
|
|
You can work out what text is selected on the client side, but it's not included in the postback data. You could put a hidden control on your page, and use javascript to populate it with the selected text from a text control.
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 )
|
|
|
|
|
Sir
In JavaScript which method can be used to retrieve the selected text of a Textbox.
Thanks in Advance....
Regards
Sivan.G
|
|
|
|
|
hi
i am successfully uploading a image and that path is stored in label
Now what i want is to store that label path(image path) in database not image only path
while i executing this programe i got this error.This is code.I got error at sqlcmd.ExecuteNonQuery().
code:
labelRes1.Text = RadUploadContext.Current.UploadedFiles [File1.UniqueID].FileName;
string imgpath = labelRes1.Text;
SqlConnection sqlcon = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DiskEra;Data Source=MAINSERVER");
sqlcon.Open();
SqlCommand sqlcmd = new SqlCommand("insert into tblCategories(ImagePath ) values (@ImagePath)", sqlcon);
sqlcmd.Parameters.AddWithValue("@ImagePath",imgpath );
sqlcmd.ExecuteNonQuery();
Response.Write("alert('File is uploaded')");
priority: very very high
regards:
kishore
|
|
|
|
|
kishoregani wrote: priority: very very high
I am still waiting for the day that someone posts a question and puts 'no hurry, whenever you have time'. Ths does not help, your deadline is your problem, we help for free, when we have time. People who pay us, are our 'very very high' priority.
The error means what it says. Your path is too long, you need to make more room in your database for paths.
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 )
|
|
|
|
|
Christian Graus wrote: I am still waiting for the day that someone posts a question and puts 'no hurry, whenever you have time'. Ths does not help, your deadline is your problem, we help for free, when we have time. People who pay us, are our 'very very high' priority.
I would say it is better here. There is an Indian discussion forum (Lounge Fame sometime back ) http://www.dotnetspider.com/qa/ where the following words are very common:
1) "Please help me"
2) urgent
3) hi <Name>
4) hi everybody
5) Doubt plz explain
6) The same question flooded multiple times
7) All CAPS
|
|
|
|
|
Try increasing the table column size where you are storing the path.
|
|
|
|
|
Hi all,
I am developing an asp.net 2.0 web site with sql2005. i need while openning a record to lock it. that means no body else than the person openning the record right now can enter and edit the same record. Any help????
|
|
|
|
|
You need to add a column where you store the Id of the person who has locked the record. And impliment a method of dealing with a user who locks a record and turns their PC off ( basically you need to also store the time locked, and have locks time out )
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 )
|
|
|
|
|
Thanks for ur reply.
Any links that i may benefit from. I googled a little but is there a link more specific on the topic.
|
|
|
|
|
hi!
can i use multiple web.sitemap files on my site?
|
|
|
|
|
|
hi...how can i customize my theme that only i choose appear in my account but not other user account?
if other user, they have their id that they can choose their own theme. im using database from VS2005 build in.what should i add?
|
|
|
|
|
I don't really know how to check why it's not working.
I have a try/catch that tells me in the catch that it didn't succeed but not sure how to really know what's going on with it.
Here's my update attempt:
SqlCommand comm = new SqlCommand("UPDATE inventoryTbl SET categoryID = @category WHERE id = @category", conn);
comm.Parameters.Add("@category", System.Data.SqlDbType.SmallInt);
comm.Parameters["@category"].Value = txtbx_itemCategory.Text;
try
{
// Execute the command
comm.ExecuteNonQuery();
// Reload page if the query executed successfully
//Response.Redirect("addrelatives.aspx");
}
catch
{
// Display error message
bttnApplyChanges.Text = "Error";
}
finally
{
// Close the connection
conn.Close();
}
|
|
|
|
|
Why do you have two columns you want to set to the same value ? Why not just use the one column for both, if they are the same ?
I'm not sure if having the same param name twice in your SQL even works, it may.
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 )
|
|
|
|
|
You are correct. I noticed it and you replied before I could modify.
Here is what it should be:
SqlCommand comm = new SqlCommand("UPDATE inventoryTbl SET categoryID = '@category' WHERE id = '@ID'", conn);
Or so it is almost like what it should be. Something is still wrong.
|
|
|
|
|
Now that you've made that change, are you also assiging a value to the @ID parameter ? Are id and categoryId strings ? If so, that's not a good idea. If not, lose the quotes.
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 )
|
|
|
|
|
I believe so here, not as strings:
comm.Parameters.Add("@ID", System.Data.SqlDbType.SmallInt);
comm.Parameters["@ID"].Value = DropDownList2.SelectedValue;
comm.Parameters.Add("@category", System.Data.SqlDbType.SmallInt);
comm.Parameters["@category"].Value = txtbx_itemCategory.Text;
Not sure what you mean by lose the quotes? You mean they should be:
comm.Parameters.Add(@ID, System.Data.SqlDbType.SmallInt);
comm.Parameters[@ID].Value = DropDownList2.SelectedValue;
comm.Parameters.Add(@category, System.Data.SqlDbType.SmallInt);
comm.Parameters[@category].Value = txtbx_itemCategory.Text;
|
|
|
|
|
Thanks, removed the quotes from the sqlcommand.
|
|
|
|
|
|
Don't start a new thread to say thank you, answer on the existing thread. It's great that you say thanks, few people do. But, it's better for it to be on the same thread, not least because the person who answers you then gets an email.
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 set a textbox value to a number....I tried the ToString method but im not sure
|
|
|
|