|
Just add the parameters below
As it is a store procedure all you have to do is to send the params to the SP..!
public static bool Update_Driver(int ID, int MeetingID, string Title)
{
bool result = false;
SqlCommand command = new SqlCommand("Your Store ProcedureName", YourConnection);
command.CommandType = System.Data.CommandType.StoredProcedure;
command.Parameters.AddWithValue("@ID", ID);
command.Parameters.AddWithValue("@MeetingID", MeetingID);
command.Parameters.AddWithValue("@Title", Title);
command.Connection.Open();
try
{
result = Convert.ToBoolean(command.ExecuteNonQuery());
}
catch (Exception ie)
{
}
command.Connection.Close();
command.Connection.Dispose();
return result;
}
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi,
I am developing a Web Application in ASP.NET and when I publish, I got options for publishing either only the required files to run the website OR all project files. If I choose all project files, then, lots of unnecessary files are being published that I dont want. I want to publish only the required files. But I see that, some files (zip fils) in a folder is not published, I think, Visual Studio assumes that, a zip file is not required to run the website. But thats wrong. I want to publish a zip file so that user can download that individually. Would anyone tell me how I can do that ?
|
|
|
|
|
AFAIK
Publishing is not but converting dll and make the code secure...!
So after publishing the files add the required zip files to the project where it used to be.So they will be no problem adding the zip files manually as it is not part of the code . If you want into a package i am afraid you cant add it manually..!
refer the link below it may help..!
http://msdn.microsoft.com/en-us/library/1y1404zt(VS.80).aspx[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi,,,
I’m trying to build a master-detail gridview that contain these features:
- Create at runtime.
- Adding , deleting and updating multi Records .
(that means in the adding operation I can add multi rows to both of master and detail and then click SaveAdd button on my webpage only one time to save all records ,
In the updating and deleting operation I can update or delete multi rows to both of master and detail and then click SaveUpdate Delete button on my webpage only one time to save all records in gridview)
- Paging,Sorting,Filtering,Resizing columns,Grouping
- (Hide/show)(Enable/Disable) colume
- Import/Export data
And I ‘m using ASPxGridView from Devexpress because I don’t want to build my grid from scratch,So I’m trying to start adding all the features which I need .
When I complete programming my second feature in the grid (Adding , deleting and updating multi Records ) the grid is running so slowly, just when I was traying to add or update records on it .
I don’t know the real reason for this, my main idea in the code is using datatable , that means when I did any operation I transferred the data from my grid to the datatabel and did all my changes and then transferred back the data from datatable to the gridview
eventually ,,,Is this the correct way ??? if not, what’s the better way to Adding , deleting and updating multi Records in a master-detail gridview which Create at runtime
I would appreciate any help in this
|
|
|
|
|
... the moving line that is found on the top of the website? like the news line and announcements?
|
|
|
|
|
|
No, thats a big white thing in the garden!
Its called a Sprantarfduc! Morality is indistinguishable from social proscription
|
|
|
|
|
Yes this is it Here is my 5
|
|
|
|
|
Hi,
I want to save the session UserName in a table using mysql.
I have the history of my base table(auction) update, delete, create information will get stored in a backup table(auction_log). I want to save username(who currently loged in and modifies the record in a table) in too the auction_log table.
reg,
Subbu
|
|
|
|
|
And what part are you having difficulties with?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Create a connection to mysql db and run an insert or update on the table.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Pass the username as a parameter to a stored procedure and insert the new record as:
insert into auction_log (field1, field2, ..., UserName)
values (@Field1, @Field2, ..., @UserName)
or similar should do it. It's been a while since I used MySql but I think that should work.
|
|
|
|
|
Hi
In my page am using ajax calendar and other ajax controls. All the pages were developed on visual studio platform and last month we linked all the pages to sharepoint. Till yesterday all the pages were working fine. But all of a sudden, now the pages that are using ajax controls are throwing error.
The control with ID 'CalExTfdate' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.
When i checked the code, script manager is present in the aspx page. Any guess where it went wrong for the pages to throw error.
Thanks in advance
Naina
Naina
|
|
|
|
|
Put your ScriptManager before any other control in your page.
Are you writing your javascript functions in html head tag?
If so, try to move all your javascript code just before where your body tag ends.
Hope this will resolve your problem.
|
|
|
|
|
Anurag Gandhi is Right.The ScriptManager should be always appear before the control that you want to use that is Ajax related, usually we put it in the master page so that it can be available for all controls.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Thanks for the replies... i have already scriptmanager in the page. And wonder is it was running till morning and all of a sudden the error started. Naina
|
|
|
|
|
can you post the markup of your page and we will point out the problem. Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi
I have a stored procedure which returns first name, lastname and id of an employee
Now this result has become a datasource for my dropdownlist
what i want to do is in the textfield, i want to display in the below format
firstname lastname [id]. I want to do this in front end only not in procedure. Kindly help me how to do this?
Regards
Naina
Naina
|
|
|
|
|
There are many ways of doing so.
1. You can populate your drop down something list like this:
foreach(DataRow row in myDataTable.Rows)
{
string text = row["FirstName"].ToString() + " " + row["LastName"].ToString() + " [" + row["Id"].ToString() + "]";
DropDownList1.Items.Add(new ListItem(text, row["Id"].ToString()));
}
2. You can use linq projection on the dataTable and use teh linq query result as your DropDownList datasource.
Hope this will help.
|
|
|
|
|
Thanks for your reply.... I got it.
Naina
|
|
|
|
|
Hi
I am having one more prob.... when selecting the item from dropdown , i want only the firstname from ddl.SelectedItem.Text
Naina
Naina
|
|
|
|
|
You can get firstname by just splitting ddl.SelectedItem.Text
|
|
|
|
|
Instead of adding the ID to the listItem value, add the first name as below:
foreach(DataRow row in myDataTable.Rows)
{
string text = row["FirstName"].ToString() + " " + row["LastName"].ToString() + " [" + row["Id"].ToString() + "]";
DropDownList1.Items.Add(new ListItem(text, row["FirstName"].ToString()));
}
and then retrieve this, rather than the text using:
ddl.SelectedItem.Value
|
|
|
|
|
This is better approch
|
|
|
|
|
Hi
I have a link button which is part of my user control. Further, the control is actually added to the control dynamically. Whilst, I can see the control, and is added to the page without any visible errors, but when I click on to fire an event which on that user control nothing happens. What is even more odd, if I add a break point to event, and then click in debug mode, I can't even reach the break point!
To try and resolve this, I have tried giving the link button ids, and ensured they unique, added override using OnInit and used the createchildcontrols method, but nothing seems to work!
Has anyone came across and if so, can give me a solution?
|
|
|
|