.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem Add Category Item by select department

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
Add Category Item by select department Firstly database has two tables Department and Category Department Table Id -------int  (PK) dep_name--------nvarchar(50) dep_description---------nvarchar(100) -------------------------------------------------------- Category Table Id------int cat_name------- nvarchar(50) cat_description----------- nvarchar(100) IsActive--------bit DepartmentId-----int   (FK) ---------------------------------------------------------- I have form contain DetailsView control under name CategoryDetailsView. My problem: this mechanism not duo correctly I don't know why,  only show to me when I run page" Procedure or function InsertCategory has too many arguments specified. " My idea when a user need to create category must on him write category details ( category name, Description, IsActive) and select this category where to insert by select department name from drop downlist This control connecting with table under name Category, insert process by stored procedure under name sp_InsertCategoryALTER Procedure [dbo].[InsertCategory] (@cat_name nvarchar(50) ,@cat_description nvarchar(100),@IsActive bit , @Result int output)AsBegin Insert Into Category (cat_name , cat_description, IsActive ) Values (@cat_name , @cat_description, @IsActive ) Select @Result = @@IdentityEnd <asp:DetailsView ID="CategoryDetailsView

View Complete Post

More Related Resource Links

problem...i want a list item to populate all data in gridview!!!


i have a dropdownbox and a gridview

what I want is to have a list item which populates all data in a gridview.

I have tried using list item selected value=0 but to no avail.

what is the easiest way to achieve this?

On New Item form, select item on choice dropdown based on query result.


I posted this on Experts Exchange awhile back with no answer, so here's hoping someone here has an idea :)

So I've mostly figured this problem out, but I need some help in getting over the hump... note that I'm using JavaScript to do this (SPServices) on SharePoint 07'.

I'm on the New Items page of a list. Based on a user's selection in a "Teacher" dropdown, I'm doing the following:

1.) Get the value of the Teacher field and several other fields (School and Visit Date)
2.) Run a CAML query based on those fields to find the last list item entered for that Teacher

So here's where I'm stuck...

I have 10 choice fields, all with choices 0, 4, 7, and 10. Depending on what they were set to in the last entered item (which I queried), I want to set the selected item on each of those dropdowns to equal that. So "Score 1" was set to "4" on the la

c# form problem with list item


I've got a c# form containing a listbox how ever i cant get

listbox1.items.Selected      to work



neither work. both not giving me the option for .selected nor selectedvalue

how does this work on c# forms as it works the above way on webforms....

Problem Select ancestors a Record

Hi; I have a table by three columns ("ID","Title","ParentID"),me want to select ancestors a Record by "ID" identifier. example: ID      Title       ParentID 1         Library       null 2         Section1      1 3        Section2       1 4        1.1              2   for example if record 4 selected return records by "ID" identifier 2,1 How can me do it?  

Select Category

Hi All. Greetings.I have 2 Table.Table_Category | ID | Category_Name |   1       Wood   2       IronTable_SubID  |   Catagory_ID  |  Name1   |    1                    | Wood12   |    1                    | Wood23   |    2                    | Iron24   |    2                    | Iron3I want result Like this.Wood             Wood1             Wood2Iron          Iron1          Iron2and If i want to go Further in Sub Category then it will be like this.Wood              Wood1           &nb

Can't select combobox item with mouse

I have a bizarre issue with my wpf 3.5 app that I just wrote. One of the computers we installed it on won't allow the user to select an item from the combobox with the mouse. The mouse can make the drop down appear like normal, but when the mouse hovers over the items they are not highlighted and clicking on one closes the drop down but doesn't select the item. This is the default combobox with no style and only the margin, itemssource and selecteditem properties set. I tried other programs that have comboboxes (IE7, Excel, a VB6 app) and all of them work just fine. We have this program installed on numerous computers throughout our company and everyone else's is working correctly. I tried uninstalling the program and the .NET framework then reinstalling. I don't know what else to try.

CascadingDropdown Extender select item on pageload

I have a form that two cascadingdropdown extenders, when the page loads  the form is populated and cascadingdropdowns do work however the values should be set as the page loads.  I have tried setting the selectedvalue of the CDD but that doesn't take.   How do I set the values of the CDD with data from a db?

people picker problem, with multiple select lose the list.

<!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} p {mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> Hi guys I have a master table with configuration for reports. when I load a InfoPath form (2010) for new report I have a approvers that set ok  , and I have  Notifies (multiple people) when I load a value form master they left me in the field only the first value(people) and lose the others. Do you know if there any way to load a multiple people value in people picker control?   Thank in advance Ramiro

No item exists at Url. It may be deleted or renamed by another user problem

Hello  all,   I am using strListUrl = subSite.Url + "/" + strSubstring + "DispForm.aspx?ID=" + listitem["ID"] for redirecting the user the list item. But it says the No item  exists at Url. It may be deleted or renamed by another user problem. After some research I came to know, I can't use ?ID=. from http://support.microsoft.com/kb/972225/en-us. Can anyone tell me, what the article is saying or Anyone has any solution.

solve VS2008 Problem how to select multiples

HiI am working on visual studio 2008 professional. In web application. I have placed few labels, textboxes and buttons and I want to align them all. I am not able to select multiple controls..Why whats the problem

Menu selected item formatting problem in mozilla

Hello, I have a problem with menu slected item. when i click on menu item it shold display in different color for that i hv wrote below code in my master page cs file. on page load.  string thispage = this.Page.AppRelativeVirtualPath; int slashpos = thispage.LastIndexOf('/');string pagename = thispage.Substring(slashpos + 1); string pagename = thispage.Substring(slashpos + 1); foreach (MenuItem mi in Menu7.Items) { if (mi.NavigateUrl.Contains(pagename)) mi.Selected = true; break; } this works fine in IE but when i run in firefox my page formatting disturbs means the content page not coming in a proper place. thanx in advance. do the needfull.         

WPF accordion item rendering problem

Hi, can any one guide  me that why WPF accordion item does not render properly in design view. I got this message NullReferenceException was thrown on "AccordionItem": Object reference not set to an instance of an object.

select n-th item

I would like to select the n-th item from a list. One way I know how to do it is like this. Please follow this example. Create a table and insert a bunch of integers in random order. create table A (col int) insert into A values (294) insert into A values (150) insert into A values (200) insert into A values (12) insert into A values (1000) insert into A values (56) insert into A values (750) insert into A values (62) insert into A values (560) If I want to select the N-th largerst number from table A, I can do this. (replace <N> with whatever number you want) select max(x.col) from ( (select top <N> col from A order by col) ) x So, if N = 5, then you should get 200 from the above example.   I'm looking for another way to do this using the rank() function. I know you can use rank() like this. select rank() over (order by col) num_rank, col from A But, how can I use num_rank column to get the N-th item. I tried something like this, but doesn't work. select rank() over (order by col) num_rank, col from A where rank() over (order by col) = 5  

Dropdown select message in item template gridview dropdwon list ???

Hi ....I have used gridview item template , which has two dropdown list .The first dropdown list is binded from database to the dropdown list I have using the below code , to show the select message in dropdown list before selecting any item from dropdown list.In first row its show me --Select-- message and my vaues.. if i select some value form dropdownlist and click add new button it will create a new row dynamic then in previous row again it come back --Select-- message... on going to second row....I need to remain first row user selected value on going to next row.The New row will show --select-- message..Please go to my code and let me know what to do<asp:DropDownList id="DropDonList2" tabIndex=11 runat="server"          OnSelectedIndexChanged="DropDonList2_SelectedIndexChanged" AutoPostBack="True"          DataTextField="SizeRange" DataValueField="SizeRange"          OnDataBound="DropDonList2_DataBound" __designer:wfdid="w10"          AppendDataBoundItems="True">  <asp:ListItem Value="-1">Select</asp:ListItem> </asp:DropDownList><asp:DropDownList id="DropDonList2" tabIndex=11 runat="server" 

Problem with SELECT COUNT query and parameters

Hello!I have a problem with SELECT COUNT query in ASP.net. I want to create CMS with articles which have categories (which have the option to be deleted). The problem is that I want to get the number of articles within the specified category so if there aren't any articles with the specified category I can proceed with the category deletion.I have the following code:protected void Page_Load(object sender, EventArgs e) { } protected void GridViewKategorije_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Uredi") { int index = Convert.ToInt32(e.CommandArgument); GridViewRow odabraniRed = GridViewKategorije.Rows[index]; TableCell ClanakID = odabraniRed.Cells[2]; string ID = ClanakID.Text; Response.Redirect("/Portal/Administracija/Kategorija.aspx?idKategorija=" + ID); } else if (e.CommandName == "Obrisi") { int index = Convert.ToInt32(e.CommandArgument); GridViewRow odabraniRed = GridViewKategorije.Rows[index]; TableCell KategorijaID = odabraniRed.Cells[2]; String connString = WebConfigurationManager.ConnectionStrings["CMS"].ToString(); SqlConnection conn = new SqlConnection(connString); conn.Open(); using (SqlC

Automatically select item with keyboard navigation in a combobox


Hi there,

in a WinForms ComboBox the selected item automatically changes, when I navigate through the combobox items with keyboard.

However, in the WPF ComboBox (IsEditable = false), the item in the list is highlighted but not automatically selected. Is there a way to change this behaviour?




How to select some part of a text in listview item?


Dear all

I have a listview in WPF application, that I bind data in it using gridview. now I want to make a search for it. making search is simple but question is this I want to make a search that if user type 'a' then system will highlight all 'a' in list view. or if user type 'lis' the system will highlight all 'lis' in that listview.

Is it possible to highlight part of the text in side of listview item? or I have to select whole listviewitme? 


Thank you so much

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend