I need to show data from API (array) in the webpage (html?).
Data from console to print in website:
so im using angular so this is in typescript :
newadress : string ;
newemail : string ;
newname : string ;
newphone : string ;
yourfunction(rev){
this.newadress=this.yourobjectlist[rev.selectedIndex-1].adresse
this.newemail=this.yourobjectlist[rev.selectedIndex-1].email
this.partnerinfo1=this.yourobjectlist[rev.selectedIndex-1].name
this.partnerinfo2=this.yourobjectlist[rev.selectedIndex-1].phone
}
your object list is the datalist you are showing on the console
Related
on post request :
{
"txnId": "qwe1",
"umn" : "fef",
"rrn" : "dwdw"
}
Use String field only for id which is auto generated in dynamodb .Int or long will not work .
I have to add an extra parameter as "meetingToken" in firebase deeplink .
But On adding an extra parameter "meetingtoken" as queryparameter im not recieving the value and getting error in joinmeeting(it) : No value passed for parameter meetingToken.
While the same works fine on passing a single parameter, What changes do i need to recieve both the parameters value.
Currently its giving me error at:
deepLink?.getQueryParameter("meetingCode")?.let { joinMeeting(it) }
No value passed for parameter 'meetingToken'
Link = https://example.in/?meetingCode=myuser?meetingToken=rtgdhh.tywufgsioqpp
private fun handleDynamicLink() {
Firebase.dynamicLinks
.getDynamicLink(intent)
.addOnSuccessListener { pendingDynamicLinkData ->
val deepLink: Uri?
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.link
on android debugging its generating the following firebase Link = https://example.in/?meetingCode=userroom?meetingToken%3DeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1Ni
deepLink?.getQueryParameter("meetingToken")
deepLink?.getQueryParameter("meetingCode")?.let { joinMeeting(it) }
}
}
.addOnFailureListener { _ ->
toast(getString(R.string.main_error_fetch_dynamic_link))
}
}
private fun joinMeeting (meetingCode:String, meetingToken:String) {
MeetingUtils.startMeeting(
this, meetingCode,
meetingToken)
}
meeting Utils.kt file to start meeting
object MeetingUtils {
fun startMeeting(context: Context, meetingCode: String, meetingToken: String)
app deep link url string
<string name="app_deep_link_url">https://example.in/?meetingCode=%1$s?meetingToken=%2$s</string>
this is the share code
private fun onShareMeetingCodeClick() {
tilCodeCreateMeeting.setEndIconOnClickListener {
binding.tilCodeCreateMeeting.error = null
toast(getString(R.string.main_creating_dynamic_link))
Firebase.dynamicLinks.shortLinkAsync {
link = Uri.parse(getString(R.string.app_deep_link_url, getCreateMeetingCode(), getCreateMeetingToken() ))
domainUriPrefix = getString(R.string.app_dynamic_link_url_prefix)
androidParameters {}
navigationInfoParameters {
forcedRedirectEnabled = true // Directly open the link in the app
}
}.addOnSuccessListener { result ->
val shortDynamicLink = result.shortLink.toString()
startShareTextIntent(
getString(R.string.main_share_meeting_code_title),
getString(R.string.main_share_meeting_code_desc, shortDynamicLink)
)
}.addOnFailureListener {
toast(getString(R.string.main_error_create_dynamic_link))
}
Can Someone guide me how to recieve value of getQueryparameter for more than 1 parameter. Thanks in Advance
You should use & instead of ? on appending the second parameter on your deep link. Also, the deep link configured should be URL-encoded since multiple parameters are configured in the deep link. Your sample deep link should look like this.
link=https%3A%2F%2Fexample.in%2F%3FmeetingCode%3Dmyuser%26meetingToken%3Drtgdhh.tywufgsioqpp
By URL-encoding the deep link, FDL will able to distinguish which parameters belongs to the deep link.
Uri.parse(getString(R.string.app_deep_link_url, getCreateMeetingCode(), getCreateMeetingToken()))
I'm not sure on what you're trying to achieve passing multiple parameters on getString for the deep link value.
Won't it make sense to create a StringBuilder or append it manually?
val deepLink = getString(R.string.app_deep_link_url)+ "%2F%3FmeetingCode%3D$meetingCode%26meetingToken%3D$meetingToken";
link = Uri.parse(deepLink);
where "app_deep_link_url" in strings.xml is
<string name="app_deep_link_url">https%3A%2F%2Fexample.in</string>
In my .NET application, I recently had to make some changes in the database structure and upon changing code I have run into this error message.
The line used to say _categoryID = new Guid(Request.QueryString["CategoryID"].ToString()); which worked fine to retrieve a list of products based on the categoryid, but now I had to add a top level category called Market, and I used int instead of Guid in the database, because to me using Guid is a pain.
But now when I change the line I mentioned to _marketID = new Int32(Request.QueryString["MarketID"].ToString()); I get the error.
Here is the chunk of code :
#region Variables
Int32 _marketID;
#endregion
if ( Request.QueryString [ "MarketID" ] != null )
{
_marketID = new Int32(Request.QueryString["MarketID"].ToString());
ViewState["MarketID"] = _marketID;
BindDataToUI ( );
CreateFilterInSession ( );
}
Try this instead :
_marketID = Convert.ToInt32(Request.QueryString["MarketID"]);
note : no need to use ToString() for querystring values, they're all natively strings anyway.
I have been trying to find the question to my answer but I'm unable to and finally I'm here. What I want to do is access the value passed to a webpage (GET, POST request) using asp.net. To be more clear, for example:
URL: http://www.foobar.com/SaleVoucher.aspx?sr=34
Using asp.net I want to get the sr value i.e 34.
I'm from the background of C# and new to ASP.NET and don't know much about ASP.NET.
Thanx.
Can you refer to this QueryString
Here he says how to access the query string using:
Request.Url.Query
That is not called a Header, but the Query String.
the object document.location.search will contain that and the javascript to get any query string value based on the key would be something like:
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
code from other question: https://stackoverflow.com/a/901144/28004
I'm doing my first steps with Newtonsoft Json parser, but there are very fex examples on VB.net apperently. I just want to parse a string, and then I want to be able to loop throught the different list
This is my code :
Dim JSON As String
Dim values As Newtonsoft.Json.Linq.JObject
JSON = "{'mailadresses': { 'List1':{'Stefaan Somers': 'JoskeVermeulen#gmail.com', 'Markske': 'mdtre#gmail.com' }, 'List2':{'Stefaan XSomers': 'Test#gmail.com', 'xMarkske': 'mdrmdtre#gmail.com' }}"
values = JObject.Parse(JSON)
It directly gives me the error when running :
Unexpected end of content while loading JObject. Path 'mailadresses', line 1, position 221.
Any idea also on how to loop through the different elements. I don't want to cast to a custom class, as described in many samples
Your json isnt valid according to jsonlint.
try this instead:
{
"mailadresses": {
"List1": {
"StefaanSomers": "JoskeVermeulen#gmail.com",
"Markske": "mdtre#gmail.com"
},
"List2": {
"StefaanXSomers": "Test#gmail.com",
"xMarkske": "mdrmdtre#gmail.com"
}
}
}