2sxc Pass variables from one view (js) to another view (razor) - razor

I need to create an app with 2 views:
A view with html form for 3 selections (categories drop-down, two numeric fields), when submitted it loads the second view.
A view with some razor code and a foreach loop that needs the 3 vars from the previous view (in a where clause).
What is the best way to pass vars from one view to another so that server side razor catches it? Can the 2sxc query system do this?
Thanks, João

standard asp.net stuff: usually you add this to the url like ?field1=something&field2=xyz
then access it using Request.QueryString["field1"]

Related

How do I get the $variables defined in Livewire controller into my blade file?

In my blade file, I have a syntax that goes like
#if($variable)
#endif
but I get an error that says "Undefined variable #variable". This variable is already defined in my Livewire controller, however, I am using a different controller for the blade file that calls this variable. Is there any way to call the defined variable from my blade file? A senior told me to "move the livewire blade line into your respective newly created blade file." but I couldn't quite understand and he's too busy to explain, so can anyone help me to figure out how fix this?
Simply said; no you can't access the variable if it's defined in a different controller/component.
If a variable is defined in a Livewire component, then it will only be available in the Livewire linked view (and potential included parts/components). If it's defined in a Laravel controller, then it's only available in that linked view. You can pass variables from Laravel to Livewire, but not the other way around. If a variable is not defined in Livewire, it won't be available in the linked view.
Your senior probably told you to move the line from your Laravel view to the Livewire view (as that is where you set the variable).

How can I pass a data element that has been bound on one HTML file to another HTML file in an AngularJS app

I am using this statement in the Index.html file to bind the element: Show Products.
I see that is is bound in the Index fie by displaying its value there. But when the products1.html file opens, the bound field does not display. I want to use it in as a placeholder in an input box in products1.html.
I am thinking of re-creating index.html as an SPA, but not sure this will work. if I add products1.html as a template into the view. I expect I might have the same problem.
Yes I am a Angularjs newbie after 2 years of experience.
Assuming that you have different controllers for the two pages, it seems that your problem is that you are not sharing the data between those controllers. Each of the controllers define a scope. It looks like the information that you want to show is well loaded in the "Index.html" controller scope, but then is not passed to the "products1.html" controller. If that is the case, there is several solutions to share data between Angular controllers:
Using services
Using $state.go services
Using stateparams
using rootscope
You can check how to do it in: Share data between AngularJS controllers

InvokeAction yields App Crash

using V2.0.0.5 - beta (not via nuget but compiled source).
All through out the application I am using Multi-View over single ViewModel. On one particular view now after a conversion from SQLCE to SQLite, I am getting either a race condition or invalid contextual return when it builds up the on the InvokeAction. One thing I am noticing is a ArgumentException on System.Windows.ni.dll and well the part of the problem is the Telerik Control primitives.dll... RadTransitionControl
The only difference between this view and another with almost exactly the same build out is the way I populate the view. The view is using a "non-table" viewmodel that I built up to show some related information between 2 related tables. When I selected one of the elements in the boundlist it presents RadMenu (edit/delete) selecting edit works goes into the method expected, using the data passed in from the selection event I am able to re-hydrate the dataitem in question to respective objects. And populate the view but it dies before completing the transition from view to view.
The thing that blows my mind here is that I am using that control all over for Transistions from one view piece to another, if I change the control to ContentControl it works just fine. Other views that have that control work as expected. Any ideas?
Moving some of the code around and separating some of the bundled code resulted in this not occurring guess problem fixed...

Capture build parameters as html report in Jenkins

As part of release management process, there can exist parallel releases targeting to overlap on environments.
Whats the best way to capture build parameters in Jenkins and add to a custom HTML report.
Like i want to see the following in the report ...
1. Build parameters used in build#XXX of build_job_releaseYYY
2. Sort the tabular report of build parameters to see how many releases have gone through Test1 environment etc
The approach i was thinking ...
Create an xml node for every set of build parameter ..
Some how keep adding these nodes to an xml - buildReport.xml
Generate an html report BuildReport.xml from the buildReport.xml to display a table of the node
The html report should be sortable.
There is the simple parameterized build report which may do what you want as it list the build parameters used in individual builds
This report is available of the job page as a link

How to Render content include razor syntax in asp.net mvc 3

In my database there is a record which include some razor syntax like that "Hello #Model.Name, Wellcome ..." When I get this record to the view how can I render this model property ?
Thanks,
There are many ways.
Pulling a View from a database rather than a file
http://razorengine.codeplex.com
http://ibashir.blogspot.com/2010/11/razor-parser-without-mvc.html
http://blog.andrewnurse.net/2010/07/22/UsingTheRazorParserOutsideOfASPNet.aspx
I'm biased towards the RazorEngine from codeplex it's been used in the Mini-Profiler from the developers of this very site.