Hello guys, welcome to the nine session on the SP dotnet a vba tutorial. In this session we will learn how to pass the values by using the query string. query string is a part of the URL which contain the data. In the given example, we are specifying that the parameter ID contain the value 10 years period and VBA is powerful, so that it will automatically identify the query string key name which will all match to the parameter in the axon or the method name. However, it is not case sensitive. Let's try to you know we are passing the ID by slash and the ID name.
We are not specifying that the value is for the idea is we don't and we automatically identified but in a certain situation When we will need to specify, then you can write the question mark parameter name, which is an ID equal to sign, and it's a value that is a symbol. It will automatically map this seven with the ID. Let's try click on the Send request. You can see that the product with dia unary does not exist because we already deleted the item seven less far with the six hit return the status quo 200 means that the it will work fine. Because if it is not case sensitive, we can also write this In the capital letter ID, it produces the same result in a certain service and we are not passing the value as the parameter for the accent question we need to use. For this, we need to use the get query name value pair method or the request method of request.
Let's try instead of deleting the ID that you're in the parameter, we are trying to read the protocol which will come in the parameter for that we need to wear or URL key values equal to request dot get query name From that, we need to identify the specific ID that is p ID stands for product ID. All you are key value store. LaShawn default access such that x dot t equal equal v ID dot value, which will return the object, we need to convert it to the string by using the Convert class and what dot two into 32 and really don't pass the AP ID instead of the ID Try to run it. Let's show postman. Along with ID, we need to specify the API ID. Let's use the two which will delete whether it will delete the product with the ID six, or the product with the ID two.
Let's see. hatred and the echo 00. Yeti to ever delete the product with the ID two instead of the product with the ID six. Let's send the request. Let's switch to the database and see we can see that the product with the two is really For that, we need to use the query name value pair method of the request class and from v2 we need to return the specific value with the given key. Thanks for watching.
If you have any doubt, feel free to contact me