autopost back not work in update panel in asp.net - asp.net

I have problem in my web
I have page contain 3 dropdown lists in update panel, every dropdown list has autopost back property, but autopost does not run.
My page is
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DrReg" EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger ControlID="Drcity" EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger ControlID="DrZone" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<table style="width: 100%;" dir="rtl">
<tr>
<td>
المنطقة
</td>
<td>
<asp:DropDownList ID="DrReg" runat="server" AutoPostBack="True" >
</asp:DropDownList>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</td>
</tr>
<tr>
<td>
المدينة
</td>
<td>
<asp:DropDownList ID="Drcity" runat="server" AutoPostBack="True">
</asp:DropDownList>
<%-- <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>--%>
<asp:SqlDataSource ID="OrgSQl" runat="server"
ConnectionString="<%$ ConnectionStrings:ymConnectionString %>"
SelectCommand="SELECT [GovID], [Gov_Title] FROM [Gov] WHERE (([Region_Id] = #Region_Id) AND ([FalgeDel] = #FalgeDel))">
<SelectParameters>
<asp:ControlParameter ControlID="DrReg" Name="Region_Id"
PropertyName="SelectedValue" Type="Int32" />
<asp:Parameter DefaultValue="False" Name="FalgeDel" Type="Boolean" />
</SelectParameters>
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td>
الحي
</td>
<td>
<asp:DropDownList ID="DrZone" class="inputbox multiple" runat="server" AppendDataBoundItems="True"
Width="120px">
<asp:ListItem Value="0">الكل</asp:ListItem>
</asp:DropDownList>
<asp:SqlDataSource ID="Zonsql" runat="server"
ConnectionString="<%$ ConnectionStrings:ymConnectionString %>"
SelectCommand="SELECT * FROM [Zone] WHERE (([City_ID] = #City_ID) AND ([FlagDel] = #FlagDel))">
<SelectParameters>
<asp:ControlParameter ControlID="Drcity" Name="City_ID"
PropertyName="SelectedValue" Type="Int32" />
<asp:Parameter DefaultValue="False" Name="FlagDel" Type="Boolean" />
</SelectParameters>
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td>
</td>
<td align="center">
<asp:LinkButton ID="SearchBtnok" class="button" runat="server"
ValidationGroup="searchysf">ابحث</asp:LinkButton>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
the code is
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
' btnCloseBrowser.Attributes.Add("onclick", "self.close()")
If Not Page.IsPostBack Then
obj.Bind(Me.DrReg, " countrt where FlageDel=0 ", "ALL")
obj.Bind(Me.Drcity, " city WHERE FalgeDel=0 and Country_Id=" & DrReg.SelectedValue, "All")
obj.Bind(Me.DrZone, " Zone WHERE FlagDel=0 and City_ID =" & Drcity.SelectedValue, "اختر")
End If
End Sub
Protected Sub DrReg_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DrReg.SelectedIndexChanged
obj.Bind(Me.Drcity, " city WHERE FalgeDel=0 and Country_Id=" & DrReg.SelectedValue, "All")
obj.Bind(Me.DrZone, " Zone WHERE FlagDel=0 and City_ID =" & Drcity.SelectedValue, "All")
End Sub
Protected Sub Drcity_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Drcity.SelectedIndexChanged
obj.begintrans()
obj.Bind(Me.DrZone, " Zone WHERE FlagDel=0 and City_ID =" & Drcity.SelectedValue, "All")
obj.comitttrans()
End Sub

You have to set AutoPostback="True" on each of your dropdownlists. The Triggers section doesn't make them post back, it only handles the events that already occur.

Related

Add a value to a Text='<%# Bind("txt_case_num") %>

Here is my entire web form so you can see what I have done. I want to be able to put the value of generatePassword(6) into the: InsertCommand="INSERT INTO utcasesTest(created_by_user_id, status_id, criticality_id, project_id, case_num, ... field in my db table.
<%# Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
'Our Function generatePassword accepts one parameter 'passwordLength'
'passwordLength will obviously determine the password length.
'The aplhanumeric character set is assigned to the variable sDefaultChars
Function generatePassword(passwordLength)
'Declare variables
Dim sDefaultChars
Dim iCounter
Dim sMyPassword
Dim iPickedChar
Dim iDefaultCharactersLength
Dim iPasswordLength
'Initialize variables
sDefaultChars = "abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ0123456789"
iPasswordLength = passwordLength
iDefaultCharactersLength = Len(sDefaultChars)
Randomize() 'initialize the random number generator
'Loop for the number of characters password is to have
For iCounter = 1 To iPasswordLength
'Next pick a number from 1 to length of character set
iPickedChar = Int((iDefaultCharactersLength * Rnd) + 1)
'Next pick a character from the character set using the random number iPickedChar
'and Mid function
sMyPassword = sMyPassword & Mid(sDefaultChars, iPickedChar, 1)
Next
generatePassword = sMyPassword
End Function
</script>
<script runat="server" type="text/vb">
Sub FormView1_Item_Inserted(ByVal sender As Object, ByVal e As FormViewInsertedEventArgs)
Response.Redirect("ThankYou.asp")
End Sub
Protected Sub FormView1_PageIndexChanging(sender As Object, e As System.Web.UI.WebControls.FormViewPageEventArgs)
End Sub
Protected Sub SqlDataSource1_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
width: 100%;
}
</style>
</head>
<body>
<!-- Input Form-->
<form id="form1" runat="server" method="post">
<div>
<asp:FormView ID="FormView1" runat="server"
DataKeyNames="case_id"
DataSourceID="SqlDataSource_OC"
DefaultMode="Insert"
OnItemInserted="formview1_Item_Inserted"
onpageindexchanging="FormView1_PageIndexChanging">
<InsertItemTemplate>
<table>
<tr>
<td>criticality_id:</td>
<td>
<asp:DropDownList ID="criticality_idTextBox"
runat="server"
Text='<%# Bind("txt_criticality_id","{0:D}") %>'
DataSourceID="SqlDataSource_Criticality"
DataTextField="ut_value"
DataValueField="criticality_id"
AppendDataBoundItems="true">
<asp:ListItem Value="0"
Text="--Select Level--"
Selected="True" />
</asp:DropDownList>
<br />
</td>
</tr>
<tr>
<td>case_num:</td>
<td>
<asp:TextBox Name="txt_case_num"
ID="case_numTextBox"
runat="server"
Text='<%# Bind("txt_case_num") %>' /> **<------ This is the textbox the value needs to go into. It will be hidden so the user wont see it**
<br />
</td>
</tr>
<tr>
<td>title:</td>
<td>
<asp:TextBox ID="titleTextBox"
runat="server"
Text='<%# Bind("txt_title") %>' />
<br />
</td>
</tr>
<tr>
<td>description:</td>
<td>
<asp:TextBox ID="descriptionTextBox"
runat="server"
Text='<%# Bind("txt_description") %>' TextMode="MultiLine" />
<br />
</td>
</tr>
<tr>
<td>external_email_address:</td>
<td>
<asp:TextBox ID="external_email_addressTextBox"
runat="server"
Text='<%# Bind("txt_external_email_address") %>' />
<br />
</td>
</tr>
</table>
<asp:LinkButton ID="InsertButton"
runat="server"
CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton"
runat="server"
CausesValidation="False"
CommandName="Cancel"
Text="Cancel" />
</InsertItemTemplate>
</asp:FormView>
<!--Datasource-->
<asp:SqlDataSource ID="SqlDataSource_OC"
runat="server"
ConnectionString="<%$ ConnectionStrings:OC_ConnectionString %>"
InsertCommand="INSERT INTO utcasesTest(created_by_user_id, status_id, criticality_id, project_id, case_num, is_active, description, title, created_by_timestamp, modified_by_timestamp, modified_by_user_id, is_external, external_email_address, object_id, object_type_id) VALUES (#txt_created_by_user_id, #txt_status_id, #txt_criticality_id, #txt_project_id, #txt_case_num, #txt_case_num **<-------This is where the value is passed to the DB**, #txt_description, #txt_title, getdate(), getdate(), #txt_modified_by_user_id, #txt_is_external, #txt_external_email_address, #txt_object_id, #txt_object_type_id)"
SelectCommand="SELECT utcasesTest.* FROM utcasesTest">
<InsertParameters>
<asp:Parameter Name="txt_created_by_user_id" DefaultValue="1" />
<asp:Parameter Name="txt_status_id" DefaultValue="1" />
<asp:Parameter Name="txt_criticality_id" />
<asp:Parameter Name="txt_project_id" DefaultValue="1" />
<asp:Parameter Name="txt_case_num" /> **<----------Paramater Definition**
<asp:Parameter Name="txt_is_active" DefaultValue="Y" />
<asp:Parameter Name="txt_description" />
<asp:Parameter Name="txt_title" />
<asp:Parameter Name="txt_created_by_timestamp" />
<asp:Parameter Name="txt_modified_by_timestamp" />
<asp:Parameter Name="txt_modified_by_user_id" DefaultValue="1" />
<asp:Parameter Name="txt_is_external" DefaultValue="Y" />
<asp:Parameter Name="txt_external_email_address" />
<asp:Parameter Name="txt_object_id" DefaultValue="-1" />
<asp:Parameter Name="txt_object_type_id" DefaultValue="-1" />
</InsertParameters>
</asp:SqlDataSource>
<!--Data source for criticallity dropdown-->
<!--Change Project ID to select criticality from right Binder: id 3 = GNRM-->
<asp:SqlDataSource ID="SqlDataSource_Criticality"
runat="server"
ConnectionString="<%$ ConnectionStrings:OCConnectionString_utcriticality %>"
SelectCommand="SELECT project_id, ut_value, criticality_id FROM utcriticality WHERE (project_id = 3)"
onselecting="SqlDataSource1_Selecting">
</asp:SqlDataSource>
<!--End data source for criticallity dropdown-->
</div>
</form>
</body>
</html>

updatepanel asynpostbacktrigger does not throw defined event?

I have the following code.
What i want is when the ddlProvince dropdown is changed, to throw the event SelectedIndexChanged, however that method is never accessed.
<asp:UpdatePanel ID="pnlCountries" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlProvince" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<tr>
<td><asp:Literal ID="Literal37" Text="<%$Resources:glossary,country %>" runat="server"/></td>
<td>
<asp:DropDownList ID="ddlCountries" CssClass="textbox" runat="server">
</asp:DropDownList>
<br />
<cc1:cascadingdropdown ID="cddCountries" runat="server" Category="Country" Enabled="True" LoadingText="<%$Resources:Glossary,loading %>" PromptText="<%$Resources:Glossary,country_choose %>"
ServiceMethod="GetCountries" TargetControlID="ddlCountries">
</cc1:cascadingdropdown>
<asp:RequiredFieldValidator CssClass="errortext" Text="<%$Resources:Glossary,required %>" SetFocusOnError="true" ID="rfvcboScenario" runat="server" InitialValue="" ControlToValidate="ddlCountries" Display="Dynamic" />
</td>
</tr>
<tr>
<td><strong><asp:Literal ID="Literal9" Text="<%$Resources:Glossary,province %>" runat="server" /> *</strong></td>
<td>
<asp:DropDownList ID="ddlProvince" CssClass="textbox" runat="server">
</asp:DropDownList>
<asp:RequiredFieldValidator CssClass="errortext" Text="<%$Resources:Glossary,required %>" SetFocusOnError="true" ID="RequiredFieldValidator1" runat="server" InitialValue="" ControlToValidate="ddlProvince" Display="Dynamic" />
<cc1:CascadingDropDown ID="cddProvince" runat="server" TargetControlID="ddlProvince" ParentControlID="ddlCountries"
Category="Province" LoadingText="<%$Resources:Glossary,loading %>" prompttext="<%$Resources:Glossary,province_select %>" ServiceMethod="GetProvincesForCountry" >
</cc1:CascadingDropDown>
</td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
Currently this codeline is never hit:
Protected Sub ddlProvince_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlProvince.SelectedIndexChanged
ReportError("ddlProvince_SelectedIndexChanged", "")
End Sub
update:
previously I had the Autopostback="true" attribute on the ddlProvince control, however, that caused a full postback (issue also described here: Drop Down List (in Update Panel) causing FULL PostBack!)
What am I missing?
EDIT:
You need to set AutoPostBack="true" for the dropdownlist. Change this:
<asp:DropDownList ID="ddlProvince" CssClass="textbox" runat="server">
</asp:DropDownList>
to this:
<asp:DropDownList ID="ddlProvince" CssClass="textbox" runat="server" AutoPostBack="true" >
</asp:DropDownList>
Possibly you haven't set the OnSelectedIndexChanged event in the Markup as seen above.
Three properties you should set: OnSelectedIndexChanged, AutoPostback & EnableViewState
<asp:DropDownList ID="ddlProvince" runat="server"
AutoPostBack="true" EnableViewState="true"
OnSelectedIndexChanged="ddlProvince_SelectedIndexChanged">
</asp:DropDownList>
Incase you are binding your dropdownlist in page_Load event, place it inside !IsPostback condition check:
protected void page_Load ( object sender, EventArgs e )
{
if(!IsPostBack)
{
//DropDownList data bind and all...
}
}

UpdatePanel not updating ListBox

I have an UpdatePanel containing a ListBox. Whenever I change selection on from a DropDown I want the list to get updated via an UpdatePanel. However this is not working.
This is my code so far:
Protected Sub drpDepartments_SelectedIndexChanged(sender As Object, e As EventArgs) Handles drpDepartments.SelectedIndexChanged
Dim conn As New SqlConnection("Data Source=BRIAN-PC\SQLEXPRESS;Initial Catalog=master_db;Integrated Security=True")
Dim deptComm As String = "SELECT department_id FROM departments WHERE department_name = #DepartmentName"
Dim deptSQL As New SqlCommand
Dim dr As SqlDataReader = deptSQL.ExecuteReader()
deptSQL = New SqlCommand(deptComm, conn)
deptSQL.Parameters.AddWithValue("#DepartmentName", drpDepartments.SelectedItem.Text)
dr.Read()
If dr.HasRows Then
Dim department_id As Integer = Convert.ToInt32(dr("department_id"))
Session("DepartmentID") = department_id
End If
dr.Close()
conn.Close()
ASP
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:ListBox ID="lstDeptMembers" runat="server" DataSourceID="SqlDataSource4" DataTextField="name" DataValueField="name" Height="176px" Width="204px"></asp:ListBox>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="drpDepartments" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringDb1 %>" SelectCommand="SELECT * FROM users u
INNER JOIN
(
Select x.user_id as userid,x.department_id,y.department_name
from user_Department x
inner join departments y
on x.department_id=y.department_id WHERE x.department_id=#parameter
)
f on u.user_id= f.userid">
<SelectParameters>
<asp:SessionParameter Name="parameter" SessionField="DepartmentID" />
</SelectParameters>
</asp:SqlDataSource>
DropDownList:
<asp:DropDownList ID="drpDepartments" runat="server" DataSourceID="SqlDataSource3" DataTextField="department_name" DataValueField="department_name">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringDb1 %>" SelectCommand="SELECT [department_name] FROM [departments]"></asp:SqlDataSource>
Screenshot:
How can I make it that the ListBox updates whenever a new selection is clicked from the DropDown ?
EDIT: Code for the table that contains the ListBox etc.. :
<asp:DropDownList ID="drpDepartments" runat="server" DataSourceID="SqlDataSource3" DataTextField="department_name" DataValueField="department_name">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringDb1 %>" SelectCommand="SELECT [department_name] FROM [departments]"></asp:SqlDataSource>
<br />
<br />
<table style="width:100%;">
<tr>
<td style="width: 221px">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:ListBox ID="lstDeptMembers" runat="server" DataSourceID="SqlDataSource4" DataTextField="name" DataValueField="name" Height="176px" Width="204px"></asp:ListBox>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="drpDepartments" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringDb1 %>" SelectCommand="SELECT * FROM users u
INNER JOIN
(
Select x.user_id as userid,x.department_id,y.department_name
from user_Department x
inner join departments y
on x.department_id=y.department_id WHERE x.department_id=#parameter
)
f on u.user_id= f.userid">
<SelectParameters>
<asp:SessionParameter Name="parameter" SessionField="DepartmentID" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td style="width: 398px">
<asp:TextBox ID="txtuserSearch" runat="server"></asp:TextBox>
<asp:Button ID="btnSearchDeptUser" runat="server" Text="Search" />
<br />
<asp:Label ID="lblAddDeptUser" runat="server" Visible="False"></asp:Label>
</td>
</tr>
<tr>
<td >
<asp:Button ID="btnRmvDeptMem" runat="server" Text="Remove" />
</td>
<td>
<asp:Button ID="btnAddDeptUser" runat="server" Text="Add" />
</td>
</tr>
</table>
Full code for Departments.aspx
If you want to update the UpdatePanel immediately when the user selects an item in the DropDownList you have to set it's AutoPostBack property to "True"(default is false):
<asp:DropDownList ID="drpDepartments" runat="server" DataSourceID="SqlDataSource3"
AutoPostack="True" DataTextField="department_name" DataValueField="department_name">
</asp:DropDownList>
try this...
Change this
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
with
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">

Dropdown not binding Inside Ajax Update panel

I am using the below code to populate a dropdown on a selection of another dropdown.
But somehow, ddlSubTypes is not getting populated when a item is selected in ddlTypes
On selectedindex change event of ddlTypes, i am binding ddlSubTypes.
<tr>
<td class="style3">
<asp:ScriptManager ID="scma" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UP1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlTypes" runat="server" Width="200px" AutoPostBack="true" OnSelectedIndexChanged="ddlTypes_SelectedIndexChanged1">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td class="style3">
<asp:UpdatePanel ID="UP2" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlSubTypes" runat="server" Width="200px">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
Protected Sub ddlTypes_SelectedIndexChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlTypes.SelectedIndexChanged
Try
'Populate schemes
ddlSubTypes.Items.Clear()
Dim ID As Integer = ddlTypes.SelectedValue
Dim dt As DataTable = IterateSubtypesContents(ID)
ddlSubTypes.DataTextField = dt.Columns("Type").ToString()
ddlSubTypes.DataValueField = dt.Columns("ID").ToString()
ddlSubTypes.DataSource = dt
ddlSubTypes.DataBind()
UP2.Update()
Catch ex As Exception
End Try
End Sub
you should add a trigger to the second update panel that gets triggered on the first dropdown's selectedIndexChanged event.
<asp:UpdatePanel ID="UP2" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlSubTypes" runat="server" Width="200px">
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Control That Triggers this Panel" EventName="Desired Event that triggers" />
</Triggers>
</asp:UpdatePanel>

DetailsView update - not returning new values

After editing some fields, clicking on Update doesn't show the new values. I have tried two ways to retrieve the new values as you can see from this shortened version of the ItemUpdating event (and both return the old ones) :-
Protected Sub DetailsView1_ItemUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewUpdateEventArgs) Handles DetailsView1.ItemUpdating
Dim txtPassword As TextBox = CType(DetailsView1.Rows(1).Cells(1).FindControl("txtPassword"), TextBox)
Struct_Student.password = txtPassword.Text
Dim PasswordValue As String = e.NewValues("password").ToString()
Struct_Student.password = PasswordValue
End Sub
Here is a shortened version of the aspx :-
<asp:Content ID="Content1" ContentPlaceHolderID="cpMainContent" Runat="Server">
<div id="Controls">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DetailsView ID="DetailsView1"
runat="server"
AutoGenerateRows="False"
DataKeyNames="student_id" DataSourceID="SqlDataSource1"
ForeColor="Blue"
BackColor="#FFF7E6"
AutoPostBack="True"
AutoGenerateEditButton = True
AutoGenerateInsertButton = True
OnModeChanging="StudentDetailView_ModeChanging"
Height=163px
Width=327px
style="left: 400px; top: 1px; position: absolute;">
<Fields>
<asp:TemplateField
HeaderText="Password">
<EditItemTemplate>
<asp:TextBox
id="txtPassword"
Text = '<%# Bind ("password") %>'
runat = "server" />
<asp:RequiredFieldValidator
ID = "reqPassword"
ControlToValidate = "txtPassword"
Text = "(required)"
Display = "Dynamic"
runat = "server" />
</EditItemTemplate>
<ItemTemplate>
<asp:Label
id="PasswordLabel"
runat="server"
Text = '<%# Eval("password") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField
datafield="emailaddress"
headertext="Email address"
SortExpression="emailaddress"
/>
</Fields>
</asp:DetailsView>
<asp:SqlDataSource
ID="SqlDataSource1"
runat="server"
ConnectionString="<%$ ConnectionStrings:FCLManager %>" ProviderName="MySql.Data.MySqlClient"
SelectCommand="Select * from tblstudentinfo WHERE centre_id = #CentreID and fullname = #FullName"
<SelectParameters>
<asp:Parameter Name="CentreID" Type="Int16" DefaultValue="0" />
<asp:Parameter Name="FullName" Type="String" DefaultValue="0" />
</SelectParameters>
</asp:SqlDataSource>
</ContentTemplate>
</asp:UpdatePanel>
</div> <%--Controls div--%>
</asp:Content>

Resources