asp.net - how i can create a page that works like stackoverflow -


i want know how did these pages work! :

https://stackoverflow.com/questions/ask

there no extension in end of address!

is way call webmethods directly?! wrote page , think not right!

public partial class _default : system.web.ui.page     {         protected void page_load(object sender, eventargs e)         {            string name= request.querystring["name"];            if (request.pathinfo == "/sayhi")response.write( sayhi(name));         }          [webmethod]         public static string sayhi(string name)         {             return "hi " + name;         }          //[webmethod]         //public static string sayhi()         //{         //    return "hi ";         //}     } 

for asp.net, can use asp.net routing, allow separately configure urls should like.

you can use both regular webforms apps , newer asp.net mvc.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -