Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Course Queries Syllabus Queries 2 years ago
Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
Aspx code:
<script type ="text/javascript"> function setContextKey() { find('AutoCompExt2').set_contextKey($get("%=TxtSyllabus.ClientID%>").value) alert(("<%=TxtSyllabus.ClientID %>").value) } script> <asp:TextBox ID = "TxtSem" runat = "server" Width = "200px" onkeyup="setContextKey()">asp:TextBox> <asp:AutoCompleteExtender ID = "AutoCompExt2" runat = "server" MinimumPrefixLength="2" CompletionInterval="100" FirstRowSelected = "false" TargetControlID= "TxtSem" EnableCaching = "false" CompletionSetCount = "10" ServiceMethod = "SearchSem" UseContextKey= "true" >asp:AutoCompleteExtender>`
VB Code:
<System.Web.Script.Services.ScriptMethod(), System.Web.Services.WebMethod()> _ Public Shared Function SearchSem(ByVal prefixText As String, ByVal count As Integer, ByVal contextKey As String) As List(Of String) Try Dim cnn As New SqlConnection Dim cmd As New SqlCommand Dim ds As New Data.DataSet Dim SyllabusName = Mid(contextKey, 1, Len(contextKey) - 4) Dim Year = Mid(contextKey, Len(contextKey) - 4, Len(contextKey)) cnn.ConnectionString = ConfigurationManager.ConnectionStrings("excelconn").ToString() cmd.CommandText = "Select Semester From MastLookup where SyllabusName='" & SyllabusName & "' And SyllabusYear='" & Year & "' And Semester=@SearchText + '%'" cmd.Parameters.AddWithValue("SearchText", prefixText) cmd.CommandType = Data.CommandType.Text cmd.Connection = cnn cnn. REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
You should be finding the AutoCompleteExtender by its BehaviorID, not ID (BehaviorIDextends functionality of the DOM element returned, i.e. providing the set_contextKey function). You're also missing a $ in front of the find function.
find
BehaviorID
ID
set_contextKey
$
<script type="text/javascript"> function setContextKey() { $find('AutoCompBehavior2').set_contextKey($get("%=TxtSyllabus.ClientID%>").value) alert(("<%=TxtSyllabus.ClientID %>").value) } script> <asp:TextBox ID="TxtSem" runat="server" Width="200px" onkeyup="setContextKey()">asp:TextBox> <asp:AutoCompleteExtender ID="AutoCompExt2" BehaviorID="AutoCompBehavior2" runat="server" MinimumPrefixLength="2" CompletionInterval="100" FirstRowSelected="false" TargetControlID="TxtSem" EnableCaching="false" CompletionSetCount="10" ServiceMethod="SearchSem" UseContextKey="true">asp:AutoCompleteExtender>
Also, you probably meant to bind setContextKey to changes to TxtSyllabus, not txtSem.
setContextKey
TxtSyllabus
txtSem
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.