Convert python chatbot code in Jupyter notebook to Visual Studio 2022 ASP.Net Web Application

I am developing a system, currently I have functions such as to-do list, CGPA calculator and so on using ASP.Net web application framework in visual studio 2022, I am facing a problem, I have a chatbot python code written in Jupyter notebook(applying algorithm), but I don’t know how to ‘convert’ this code to the ASP.Net web application webform(C#), Is there any method or alternative way to do it, thank you.

Do you know Python? If you know how to write Python, then you just convert the Python syntax to C#. Is the Python code just a demo?
Also, are you sure you want to use ASP.NET WebForm? I don’t think it’s the best choice now. You may consider using ASP.NET Core Web API + a frontend framework (e.g. React, Angular, Vue or Blazor).
Please describe your question clearly with more context and this would help others understand what you want to do.

If the python chatbot code apply algorithms like TFIDF, decision tree, naive bayes to answer query about university…is it possible to convert to C#?

It depends on how complex the Python code is. If it depends on some Python packages - then you need to check if you can find similar packages in .NET. If you cannot find proper .NET packages, this task would be a bit tricky.