Click here to Skip to main content
15,896,269 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionajax call to shared (static) mehtod Pin
classy_dog27-Aug-16 3:45
classy_dog27-Aug-16 3:45 
AnswerRe: ajax call to shared (static) mehtod Pin
jkirkerx29-Aug-16 10:15
professionaljkirkerx29-Aug-16 10:15 
Questionasp.net javascript issue Pin
Member 1178145525-Aug-16 5:36
Member 1178145525-Aug-16 5:36 
AnswerRe: asp.net javascript issue Pin
jkirkerx25-Aug-16 9:13
professionaljkirkerx25-Aug-16 9:13 
GeneralRe: asp.net javascript issue Pin
Member 1178145525-Aug-16 18:00
Member 1178145525-Aug-16 18:00 
QuestionWhich Property of Grid View would help me? Pin
Usman ali24-Aug-16 22:31
Usman ali24-Aug-16 22:31 
AnswerRe: Which Property of Grid View would help me? Pin
Richard Deeming25-Aug-16 2:11
mveRichard Deeming25-Aug-16 2:11 
Questionweb form gridview control Pin
dcof23-Aug-16 7:08
dcof23-Aug-16 7:08 
In a vb.net 2010 web form application, there is the following line of code in a
gridview control.
<asp:TemplateField HeaderText="Student Name" ItemStyle-HorizontalAlign="Center" 
ItemStyle-CssClass="ui-widget-content" > 
                                <ItemTemplate > 
                                    <a href="javascript: 
GetStudentLetterTemplate('<%# Eval("schoolyear") %>', '<%# Eval("schoolnum") 
%>', '<%# Eval("milestone_code") %>', '<%# Eval("stulink") %>', '<%# 
Eval("HOMELNGCOR") %>', '<%# Eval("semester") %>');" 
style="color:Blue"><%#Eval("STUDENTNAME")%></a> 
                                </ItemTemplate> 
                            </asp:TemplateField> 

When the user clicks on this link, the user is directed to some javascript code
called GetStudentLetterTemplate.


Once in the javascript function, I want to display an error message to the user
saying basically saying there is duplicate data in the database. I want to then
want the function to 'return' so no processing by the user can occur. Note: the
duplicate data is created by the user by them using vendor software that I have
no control over.


The sql that I want to use is something like the following:
 #Region "Public Shared Function GetDupScoolYear"
<WebMethod()> _
Public Shared Function GetDupScoolYear() As DataTable
    Dim _dt As DataTable = New DataTable()

    Dim Query As String = "SELECT [personID],value, count(*) as Count FROM
   [t].[dbo].[CustomStudent] where attributeID = 2775 and [personID] = 97366 group
   by [personID],value"
    Using con As SqlConnection = DB.OpenConnection()
        Using da As SqlDataAdapter = New SqlDataAdapter(Query, con)

            Try
                da.Fill(_dt)
            Catch ex As Exception

            End Try

        End Using
        End Using
       Return _dt
     End Function
   #End Region

Thus can you tell me or show me what I can do to solve the problem? Is there
possibly someway that I could call the code I listed above or similar code
before the java script code is called?


Basically would you tell me what I can do to solve this issue?

modified 23-Aug-16 22:22pm.

QuestionI have thousands of user who are accessing my site, How should I handle a load ? Pin
Abhijit Mindcraft22-Aug-16 22:57
Abhijit Mindcraft22-Aug-16 22:57 
AnswerRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
deepankarbhatnagar23-Aug-16 0:20
professionaldeepankarbhatnagar23-Aug-16 0:20 
GeneralRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
Abhijit Mindcraft23-Aug-16 0:48
Abhijit Mindcraft23-Aug-16 0:48 
GeneralRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
deepankarbhatnagar23-Aug-16 3:43
professionaldeepankarbhatnagar23-Aug-16 3:43 
GeneralRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
Abhijit Mindcraft23-Aug-16 20:45
Abhijit Mindcraft23-Aug-16 20:45 
GeneralRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
jkirkerx25-Aug-16 9:20
professionaljkirkerx25-Aug-16 9:20 
Questionadd data to more table relation in same time Pin
ahmed_sa20-Aug-16 12:05
ahmed_sa20-Aug-16 12:05 
AnswerRe: add data to more table relation in same time Pin
ahmed_sa21-Aug-16 5:11
ahmed_sa21-Aug-16 5:11 
Questionweb form message using master pages message and/or JavaScript message Pin
dcof18-Aug-16 12:07
dcof18-Aug-16 12:07 
AnswerRe: web form message using master pages message and/or JavaScript message Pin
John C Rayan19-Aug-16 2:24
professionalJohn C Rayan19-Aug-16 2:24 
GeneralRe: web form message using master pages message and/or JavaScript message Pin
dcof19-Aug-16 9:30
dcof19-Aug-16 9:30 
GeneralRe: web form message using master pages message and/or JavaScript message Pin
John C Rayan21-Aug-16 22:16
professionalJohn C Rayan21-Aug-16 22:16 
Questionweb form using javacript Pin
dcof17-Aug-16 16:16
dcof17-Aug-16 16:16 
AnswerRe: web form using javacript Pin
Peter Leow17-Aug-16 16:49
professionalPeter Leow17-Aug-16 16:49 
AnswerRe: web form using javacript Pin
F-ES Sitecore17-Aug-16 22:48
professionalF-ES Sitecore17-Aug-16 22:48 
RantRe: web form using javacript Pin
Richard Deeming18-Aug-16 1:48
mveRichard Deeming18-Aug-16 1:48 
GeneralRe: web form using javacript Pin
Richard MacCutchan18-Aug-16 2:34
mveRichard MacCutchan18-Aug-16 2:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.