read table and display in text box
EMP Table AS Follows;
EMPID EMPNAME EMPADD EMPMOBILE EMPSALARY
1 Raj HYD 90123456 5000
2 Ram XXX 14567 6788
from the above EMP Table i wan the output as follows
Raj hyd 90123456 5000 (TEXTBOX )
WRITE THE CODE PLZ
Loading
Akkiraju IvaturiPosted Jan 21, 2013, 10:48 PM
select EMPNAME + ' ' + EMPADD + ' ' + CAST(EMPMOBILE AS VARCHAR(100)) + ' ' + CAST(EMPSALARY AS VARCHAR(100)) as EMPDETAILS FROM EMP
This will give you the whole columns as a part of one string and you can assign the value to the textbox.
You need to CAST all the numeric datatypes to VARCHAR so that you can append them in the query.
In the grid view set the DataKeyName as ID. Retrieve the selected EMP ID using the DataKeyName value and pass it to the query as below:
select EMPNAME + ' ' + EMPADD + ' ' + CAST(EMPMOBILE AS VARCHAR(100)) + ' ' + CAST(EMPSALARY AS VARCHAR(100)) as EMPDETAILS FROM EMP WHERE EMPID = @EMPID
After retrieving the value, send as SMS using the URL:
http://krishnasaralanet.blogspot.in/p/sending-sms-from-aspnet-application.html
Let me know if you need any help.
JAYRAMPosted Jan 21, 2013, 9:44 PM
EMP Table AS Follows;
EMPID EMPNAME EMPADD EMPMOBILE EMPSALARY
1 Raj HYD 90123456 5000
2 Ram XXX 14567 6788
from the above EMP Table i wan the output as follows
my requriment is the above fields display in gridview
when i select record in giridview eid ename empadd empsal the 4 values to send the sms to empmobile this is my requirment
plz write the code... how to selct 4 values(eid ename empadd empsal) in database and select to send the sms to empmobile
Akkiraju IvaturiPosted Jan 21, 2013, 2:06 PM
Give some more information to help you out.