3
Answers

Match the value In the DropDownlist through SQL IN ASP.NET?

Richa Garg

Richa Garg

12y
5.8k
1
Hi Friends,
    I made a table in the SQL DATABASE in which two values are displayed one is the value and other is the code of that particular value. Now In Asp.net all these values are displayed in the dropdownlist. I want when I click on any value in the dropdownList the corresponding code of that clicked value will be fetch from the database and Display that code in the label. How can this possible? Please help me out.
Answers (3)
3
Nitin Sontakke

Nitin Sontakke

NA 11.7k 2.2k 8y
Web technologies are evolving day-by-day and i am not quite up-to-date with the evolution.
 
However, I am pretty certain that you would need some sort of server-side processing. From the way you have framed the question, it seems to me, that you are not quite clear about the request-response model of http protocol on which the web works.
 
Connecting to sql server from javaScript, while might be possible (I am not sure), it is not a very good idea from security perspective, i guess.
 
And where would you put all your business logic?
 
Calling asp.net a front-end would be incorrect. It is a server side technology.
 
You can have all your front-end in HTML5, CSS and Javascript and write a server-side code in WebAPI.
 
You may wish to look into serverless architecture (I still not have looked into!)