divyasrinivasan -3 Newbie Poster

can u pls explain wat u hVE DONE..PLA

peter_budo commented: We strongly encourage all posts to be in full-sentence English. -3
divyasrinivasan -3 Newbie Poster

hi ...
thanks a lot..i got how to edi,update,n delete..now i want to validate the textbox wen i press update...like i want to ckeck for null vlues entry...only numbers.......i am searching for javascript but no proper result...

any links ..pls post....

divyasrinivasan -3 Newbie Poster

hi ...
thanks a lot..i got how to edi,update,n delete..now i want to validate the textbox wen i press update...like i want to ckeck for null vlues entry...only numbers.......i am searching for javascript but no proper result...

any links ..pls post....

divyasrinivasan -3 Newbie Poster

Hi iam using login controls....for that i went o asp .net configuration
website->asp configuration i went to security created roles and all...
but something has to be written in webconfig file ..iam not able to get that..pls if anyone knowns about it pls guide.......

divyasrinivasan -3 Newbie Poster

thanks everyone for replying ..iam trying out if ny doubts will get back..thanks a lot

divyasrinivasan -3 Newbie Poster

hi i want to have the code for editing,updating n deleting data in gridvoiew
i tried a lot searching in google..i trid also but could not get the output....i want how to insert textboxes using the edit colums ....i want in detail pls help...

2.next is how to add rows dynamically to gridview n custom columns to gridview...if u answer many may find useful as this is the baic of gridview...pls do help...i want indetail...

divyasrinivasan -3 Newbie Poster

one request wen u get the solution pls paste here so tat others can also have an idea......otherwise again a thrad will be started n redundancy will take place...so i request all to paste the solution

divyasrinivasan -3 Newbie Poster

guys some one reply.....i want the code

divyasrinivasan -3 Newbie Poster

i want to take a button and a text..i give a string in textbox n in button click i want the string to convert to bytearray....

i wrote the code in button click

string s="divya";
byte[] bytstr=Encoding.ASCII.GetBytes(s);

now wat to do next ...where to input n how to display the encoded string....

divyasrinivasan -3 Newbie Poster

thanks a lot...vizy,greeny n traicey..u made it ..thanks a ton..n thanks for replying for my so called questions

divyasrinivasan -3 Newbie Poster

country table...
countryid countryname
1 america
2 brazil
3 india

divyasrinivasan -3 Newbie Poster
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("sql is connected");
SqlDataAdapter da = new SqlDataAdapter("select countryid,countryname from countryname", cn);
DataSet ds = new DataSet();
da.Fill(ds,"countryname");
ddlcountryname.DataSource = ds.Tables["countryname"];
ddlcountryname.DataTextField = "countryname";
ddlcountryname.DataValueField = "countryid";
ddlcountryname.DataBind();


}
protected void ddlcountryname_SelectedIndexChanged(object sender, EventArgs e)
{
string country_id;
country_id = ddlcountryname.SelectedValue.ToString();
SqlDataAdapter da1=new SqlDataAdapter("select stateid,statename from statename where countryid=' country_id'",cn);
DataSet ds1 = new DataSet();
da1.Fill(ds1, "statename");
ddlstatename.DataSource = ds1.Tables["statename"];
ddlstatename.DataTextField = "statename";
ddlstatename.DataValueField = "stateid";
ddlstatename.DataBind();
}
divyasrinivasan -3 Newbie Poster

the query u gave me i wrote it ..u can see tat...but there is no output...
like
stateis statename countryid
100 Ahmedabad 1
101 guntur 2
103 -----

see these r alll same for india ..wat i shld do but country id 1 ,2 ,3

divyasrinivasan -3 Newbie Poster

its registration form ..i cant keep button na...u find this in many site select country n corresponidng states will come in another dropdownlist...but the code iam not finding

divyasrinivasan -3 Newbie Poster

ya i got all the countries wic i inserted into ddllcountryname

divyasrinivasan -3 Newbie Poster

hi myrequirement is i have two dropdownlist one is country n other is statename.....wen i selelc india corresponding states shls come...but i see my selected index function is different from urs...pls explain tat...n is my code right..iam not getting the output....

one more thing how did u create the table for tat category..like i inserted 79 countries.....with id...now in state table i need to insert 28 states for india..
stateid statename countryid.....or i need to have stateid statename1........statename28 countryid

divyasrinivasan -3 Newbie Poster

i have two drop downlist wen i select india the partcular states shld come....but my selected index function is different from urs....is it correct

divyasrinivasan -3 Newbie Poster

pls give me the complete code for it ..i tryed but not getting the output..pls help..iam pasting the code here but no output

protected void Page_Load(object sender, EventArgs e)
    {
       
        
        Response.Write("sql is connected");
        SqlDataAdapter da = new SqlDataAdapter("select countryid,countryname from countryname", cn);
        DataSet ds = new DataSet();
        da.Fill(ds,"countryname");
        ddlcountryname.DataSource = ds.Tables["countryname"];
        ddlcountryname.DataTextField = "countryname";
        ddlcountryname.DataValueField = "countryid";
        ddlcountryname.DataBind();
        

    }
    protected void ddlcountryname_SelectedIndexChanged(object sender, EventArgs e)
    {
        string country_id;
        country_id = ddlcountryname.SelectedValue.ToString();
        SqlDataAdapter da1=new SqlDataAdapter("select stateid,statename from statename where countryid=' country_id'",cn);
        DataSet ds1 = new DataSet();
        da1.Fill(ds1, "statename");
        ddlstatename.DataSource = ds1.Tables["statename"];
        ddlstatename.DataTextField = "statename";
        ddlstatename.DataValueField = "stateid";
        ddlstatename.DataBind();
    }

my database is something like this...i have two tables countryname(countryid identity(1,1),countryname) and statename(stateid identity(100,1),statename,countryid)

so i have inserted 78 countries in country table in tat 73rd is india...
n i have inserted states of india in statename table(28)..how to get india's states wen india in selected

divyasrinivasan -3 Newbie Poster

if i keep autopostback to tru ...if i select some country say america...iam getting the first country selected ..tat is afganisthan....
i have
afganisthan
america
india
say if i select india afganisthan is only coming.....n i want databasee like how to insert states for country india....like i said i have 3 fields...but i have 28 states....how to write table...
lot of confusion

divyasrinivasan -3 Newbie Poster

hi above....
can u post ur entired code after making the necessry corrections pls....i need it urgently

divyasrinivasan -3 Newbie Poster

pls give me the complete code for it ..i tryed but not getting the output..pls help..iam pasting the code here but no output

SqlConnection cn = new SqlConnection(ConfigurationSettings.AppSettings["con"].ToString());
   
    protected void Page_Load(object sender, EventArgs e)
    {
       
        
        Response.Write("sql is connected");
        SqlDataAdapter da = new SqlDataAdapter("select countryid,countryname from countryname", cn);
        DataSet ds = new DataSet();
        da.Fill(ds,"countryname");
        ddlcountryname.DataSource = ds.Tables["countryname"];
        ddlcountryname.DataTextField = "countryname";
        ddlcountryname.DataValueField = "countryid";
        ddlcountryname.DataBind();
        

    }
    protected void ddlcountryname_SelectedIndexChanged(object sender, EventArgs e)
    {
        string country_id;
        country_id = ddlcountryname.SelectedValue.ToString();
        SqlDataAdapter da1=new SqlDataAdapter("select stateid,statename from statename where countryid=' country_id'",cn);
        DataSet ds1 = new DataSet();
        da1.Fill(ds1, "statename");
        ddlstatename.DataSource = ds1.Tables["statename"];
        ddlstatename.DataTextField = "statename";
        ddlstatename.DataValueField = "stateid";
        ddlstatename.DataBind();
    }

my database is something like this...i have two tables countryname(countryid identity(1,1),countryname) and statename(stateid identity(100,1),statename,countryid)

so i have inserted 78 countries in country table in tat 73rd is india...
n i have inserted states of india in statename table(28)..how to get india's states wen india in selected