i have 3 dropdownlist in my aspx page.
I have given auto postback =true to my dropdownlists....
when selecting the value from dropdownlist,
that time pwd and confirm pwd columns are going to blank in my aspx page....
afterthat,
even if i give all the columns correctly ,, Gender(Radiobutton) which is not supplied in the current context....
Like that i am receiving the error msg....
How to solve.....
please help me friends....
coding
create proc [dbo].[SP_GetContinent]
as
begin
select Continentid,Continentname from dbo.tblcontinents
end
create proc [dbo].[SP_GetCountriesByContinentID]
@Continent_id int
as
begin
select Countryid,Countryname from dbo.tblCountry where Continent_id =@Continent_id
end
create proc [dbo].[SP_GetStatesByCountry]
@Country_id int
as
begin
select Stateid,Statename from dbo.tblState where Country_id =@Country_id
end
<tr>
<td class="style3">
<asp:Label ID="Label11" runat="server" Text="Continent" CssClass="style2"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DDL_Continent" runat="server" Width="150px"
DataTextField="Continentname" DataValueField="Continentid" AutoPostBack="true"
onselectedindexchanged="DDL_Continent_SelectedIndexChanged" TabIndex="10">
</asp:DropDownList>
</td>
<td>
</td>
</tr>
<tr>
<td class="style3">
<asp:Label ID="Label12" runat="server" Text="Country" CssClass="style2"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DDL_Country" runat="server" Width="150px"
DataTextField="Countryname" DataValueField="Countryid"
onselectedindexchanged="DDL_Country_SelectedIndexChanged" TabIndex="11" AutoPostBack="true">
</asp:DropDownList>
</td>
<td>
</td>
</tr>
<tr>
<td class="style3">
<asp:Label ID="Label13" runat="server" Text="City" CssClass="style2"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DDL_City" runat="server" Width="150px"
DataTextField="Statename" DataValueField="Stateid" TabIndex="12" AutoPostBack="true">
</asp:DropDownList>
</td>
<td>
</td>
</tr>
when i select the dropdownlist item, password and confirm password textboxes goes to blank.. and then if i try to insert the value in the aspx page...
public void insert(property_Register _PRo)
{
con.Open();
cmd = new SqlCommand("SP_User_Register_Insert", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@FirstName", _PRo.FName);
cmd.Parameters.AddWithValue("@LastName", _PRo.LName);
cmd.Parameters.AddWithValue("@UserName", _PRo.UName);
cmd.Parameters.AddWithValue("@Password", _PRo.Pwd);
cmd.Parameters.AddWithValue("@Gender", _PRo.Gender);
cmd.Parameters.AddWithValue("@Education", _PRo.Education);
cmd.Parameters.AddWithValue("@Techinical", _PRo.Tech);
cmd.Parameters.AddWithValue("@Relocation", _PRo.Reloc);
cmd.Parameters.AddWithValue("@FavColor", _PRo.FavColor);
cmd.Parameters.AddWithValue("@Continent", _PRo.Continent);
cmd.Parameters.AddWithValue("@Country", _PRo.Country);
cmd.Parameters.AddWithValue("@City", _PRo.City);
cmd.Parameters.AddWithValue("@Mail", _PRo.MailID);
cmd.Parameters.AddWithValue("@Mob", _PRo.Mobno);
cmd.ExecuteNonQuery();
con.Close();
}
I am getting error like this
Procedure or function 'SP_User_Register_Insert' expects parameter '@Gender', which was not supplied.