What is the difference between String and string?

string is an alias for System.String. So technically, there is no difference. It’s like int vs. System.Int32. As far as guidelines, I think it’s generally recommended to use string any time you’re referring to an object. e.g.

Likewise, I think it’s generally recommended to use String if you need to refer specifically to the class. e.g.

Tagged

How do we get query string values in JavaScript?

You don’t need jQuery for that purpose. You can use just some pure JavaScript:

Usage:

How do we redirect the user from one page to another using jQuery?

jQuery is not necessary, and window.location.replace(…) will best simulate an HTTP redirect. It is better than using window.location.href =, because replace() does not put the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button fiasco. If you want to simulate someone clicking on a link, use location.href. If you want to simulate an HTTP redirect, use location.replace. For example:

 

What is the difference between tempdata ,viewdata and viewbag?

Temp data : Helps to maintain data when you move from one controller to other controller or from one action to other action. In other words when you redirect,“tempdata” helps to maintain data between those redirects. It internally uses session variables. View data : Helps to maintain data when you move from controller to view. View Bag : It’s a dynamic wrapper around view data. When you use “Viewbag” type casting is not required. It uses the dynamic keyword internally. Session variables : By using session variables we can maintain data from any entity to any entity. Hidden fields and … Click here to continue…..