-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: BalajiKrishnan
Message 1 in Discussion
Hi All, I have a list control in a mobile form <mobile:form id="mnuState"
runat="server">
<mobile:Label id="Label19" runat="server" Font-Bold="True" Alignment="Center">Todays
News</mobile:Label>
<mobile:List id="lstState" runat="server" ItemsAsLinks="True" OnItemCommand
="lstState_ItemCommand"></mobile:List>
<mobile:Link id="lnkState" runat="server" NavigateUrl="#MainMenu">Main
Menu</mobile:Link>
</mobile:form> On Code-behind I bind the data into the list control
protected void mnuState_Activate(object sender, System.EventArgs e)
{
string strKey = "SDH";
string sql = "SELECT HLine FROM smsCont Where CatID='"+ strKey +"'";
SqlConnection conn = new SqlConnection
("server=SERVER; uid=sa; password=sa; database=master");
SqlCommand comm = new SqlCommand(sql, conn);
SqlDataReader reader;
conn.Open();
reader = comm.ExecuteReader();
lstState.Items.Clear();
while (reader.Read())
lstState.Items.Add(reader.GetString(0));
conn.Close();
conn = null;
comm = null;
reader = null;
} Now the data will be as hyperlink as i mentioned ItemsAsLinks="True". So when i
click the link I had written the code. protected void lstState_ItemCommand(object
sender, ListCommandEventArgs e)
{
string strvalue;
strvalue = e.ListItem.Value;
}
The problem I face is when i click the link it is not coming into the
lstState_ItemCommand event.
What is the problem
Balaji
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]