Hello All,
I have a grid view that allows sorting, paging, editing, etc.
Under On Load event, if I check: if(!IsPostBack) { DisplayData(); }, the Edit portion works fine. However, the Sorting and paging portions won't. If I just call the DisplayData() method then the Edit portion doesn't work. I found out that when sorting the sorting value doesn't persist and I need to store it elsewhere when doing postbacks, but the...
User Profile
Collapse
-
Add radio button dynamically at run-time
Hi all,
I'm reading user information from Active Directory. I'm allowing the users to search by username from a web form. There will be times when the result will be more than one record. What I'm trying to do is to generate radio buttons at run-time, so users can select the user account they are looking for, and then populate the information into a form.
My question is how do I create a single event handler for more... -
try this:
SqlCommand sqlCount = myConnection.Cr eateCommand();
sqlCount.Comman dText = "SELECT COUNT(*) FROM tablename WHERE UserName = '" + aUserName + "'";
int recCount = (int)sqlCount.E xecuteScalar();
if (recCount == 0) // no existing record for username
{
insert record
}
else
... -
Hi again,
I was able to do it, but when I try to add the web part to a page, I got the following error:
An unhandled exception has occurred.
Request for the permission of type "System.Data.Sq lClient.SqlClie ntPermission, System.Data, Version=2.0.0.0 , Culture=neutral , PublicKeyToke=b 77a5c56e089" failed.
Any idea?
Thanks
here is the code....
public DataTable getRecords()...Leave a comment:
-
Web Part drop down list
Hi All,
I'm trying to create a web part that will populate data in a drop down menu, I'm not sure how to pass the data from the method where I'm retrieving the data to the CreateChildCont rols method. It compiles fine, but when I add the web part to the page, there is no data in the drop down menu. I'm new on the whole .net stuff. Any help will be greatly appreciate. Thanks in avance
here is my code I have so far
...
No activity results to display
Show More
Leave a comment: