Eliyahn -- I have a SQL Sever table that includes Client Data -- I created
an AJAXenabled Web Site with a TextBoxSSN, a SQLDataSource, and an
ASPxGridView (from DevExpress). In my Select Query, I've included a WHERE
Clause (WHERE (SSN = @SSN) and the following Parameter: SSN =
TextBoxSSN.Text
SSN is a PrimaryKey in my SQL Server table. I have set Visible option for
the SSN field to FALSE (to comply with HIPPA guidelines), but when I do
this, I'm not able to UPDATE or DELETE records. How can I ADD, UPDATE,
DELETE records in the SQL Server table without showing the SSN field?
I read your post about setting Visible=True, and hidding the control with a
css rule display none -- where do I create this css rule?
Thanks in advance for your (or anyone else's) assistance on this.
WebGuy
Here's my SELECT Statement
SELECT SSN, MaskedSSN, LAST_NAME, FIRST_NAME, MI, DOB, STREET_1, CITY_1,
STATE_1, ZIP_1, ACTIVE_ADDR, STREET_2, CITY_2, STATE_2, ZIP_2, PHONE_1,
PHONE_2, MOBILE_PHONE, EMAIL_1, EMAIL_2
FROM tblClient WHERE (SSN = @SSN)
===============================================
"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@mMvVpPsS.org> wrote in
message news:OMpmZ647HHA.4436@TK2MSFTNGP03.phx.gbl...
[quoted text, click to view] > Server controls with Visible=false don't get rendered to client and don't
> come back in postbacks. That's why you can't retrieve them. Leave
> Visible=true and hide the control with a css rule display:none.
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]
>
http://msmvps.com/blogs/egoldin >
http://usableasp.net >
>
> "phyumon thant" <phyumon@gmail.com> wrote in message
> news:OQTYKu47HHA.1900@TK2MSFTNGP02.phx.gbl...
>>
>>
>> I can retrieve the value from gridview but i cann't if the value is
>> invisible in gridview. If i read the value that is hidden i got the
>> value null. I don't know why. if someone know, please let me know.
>>
>> my code is as follow
>>
>> protected void GridView3_RowUpdating(object sender,
>> GridViewUpdateEventArgs e)
>> {
>> int a = GridView3.EditIndex;
>>
>> Control ctl = GridView3.Rows[a].Controls[0];
>> string value =
>> ((System.Web.UI.WebControls.TextBox)(ctl.Controls[1])).Text;
>>
>> Control ctl1 = GridView3.Rows[a].Controls[1];
>> string value1 =
>> ((System.Web.UI.WebControls.TextBox)(ctl1.Controls[1])).Text;
>>
>> Control ctl2 = GridView3.Rows[a].Controls[3];
>> string value2 =
>> ((System.Web.UI.WebControls.TextBox)(ctl2.Controls[1])).Text;
>>
>>
>> }
>>
>> i got value and value1 but didn't get value2 because i make it invisible
>> in gridview. i want to have this. please help me.
>>
>> Thanks a lot!
>>
>>
>>
>>
>>
>> *** Sent via Developersdex
http://www.developersdex.com ***
>
>