logo
down
shadow

Bind IIS local websites in dropdown list of wix installation?


Bind IIS local websites in dropdown list of wix installation?

By : Timon
Date : November 21 2020, 07:38 AM
should help you out After working long for the creating the installer for my application using http://wixtoolset.org/ and i am using 3.10v,finally i got the working .msi installer file. , Just add a custom action like this:
code :
  <CustomAction Id="GetIISWebsitesID" BinaryKey="GetIISWebsites" DllEntry="CustomAction1" Execute="immediate" Return="check"></CustomAction>
  <Binary Id="GetIISWebsites" SourceFile="..\GetIISWebsites\bin\Debug\GetIISWebsites.CA.dll"/>
namespace GetIISWebsites
{
    public class CustomActions
    {
        [CustomAction]
        public static ActionResult CustomAction1(Session xiSession)
        {
            System.Diagnostics.Debugger.Launch();
            Microsoft.Deployment.WindowsInstaller.View lView = xiSession.Database.OpenView("DELETE FROM ComboBox WHERE ComboBox.Property='xxxxxxxx'");
            lView.Execute();

            lView = xiSession.Database.OpenView("SELECT * FROM ComboBox");
            lView.Execute();
            List instances = RetrieveIISWebsites();
            int Counter = 0;
            int Index = 0;
            bool flag = false;
            try
            {
                foreach (string str in instances)
                {
                    Record lRecord = xiSession.Database.CreateRecord(4);
                    lRecord.SetString(1, "xxxxxxxx");
                    lRecord.SetInteger(2, Index);
                    lRecord.SetString(3, str);
                    lRecord.SetString(4, str);
                    lView.Modify(ViewModifyMode.InsertTemporary, lRecord);
                    Counter = Index;
                    ++Index;
                }
            }
            catch (Exception ex)
            {
                ex.ToString();
                xiSession.Log("Exception Details: " + ex.Message);
            }
            lView.Close();

            xiSession.Log("Closing view");
            lView.Close();
            return ActionResult.Success;
        }
        private static List RetrieveIISWebsites()
        {
            List result = new List();
            var websites = GetSites();
            foreach (Site site in websites)
            {
                result.Add(site.Name);
            }

            return result;
        }
        private static SiteCollection GetSites()
        {
            var iisManager = new ServerManager();
            SiteCollection sites = iisManager.Sites;
            return sites;
        }
    }
}


Share : facebook icon twitter icon
Bind dropdown to local (browser) database with HTML5/jQuery/ASP.NET

Bind dropdown to local (browser) database with HTML5/jQuery/ASP.NET


By : Carlos López
Date : March 29 2020, 07:55 AM
I wish did fix the issue. So I know how to store and retrieve data in a local database (Chrome). My function to retrieve data is
code :
for (var i = 0; i < results.rows.length; i++) {
    var row = results.rows.item(i);
    var newFeature = new Object();
    newFeature.id = row['id'];
    newFeature.name = row['name']

    $('#ddlPatients').append(
        $('<option></option>').val(newFeature.id).html(newFeature.name)
     );
}
How to Bind dropdown list from the value of other dropdown list in Gridview

How to Bind dropdown list from the value of other dropdown list in Gridview


By : PixelPower
Date : March 29 2020, 07:55 AM
Hope that helps Set AutoPostBack to true on the cascading dropdowns.The handle the SelectedIndexChanged event of the dropdownlist. It's important that you databind the GridView itself not on postbacks, therefore use the IsPostBack property. Otherwise events aren't trigggered.
code :
protected void Ddl1_SelectedIndexChanged(object sender, EventArgs e)
{
    DropDownList ddl1 = (DropDownList)sender;
    GridViewRow row = (GridViewRow)ddl1.NamingContainer;
    DropDownList ddl2 = (DropDownList)row.FindControl("DropDownList2ID");
    // here get the datasource for ddl2 according to ddl1.SelectedValue
    ddl2.DataSource = GetDataSource(ddl1.SelectedValue);
    ddl2.DataBind();
}

protected void Ddl2_SelectedIndexChanged(object sender, EventArgs e)
{
    DropDownList ddl2 = (DropDownList)sender;
    GridViewRow row = (GridViewRow)ddl2.NamingContainer;
    DropDownList ddl3 = (DropDownList)row.FindControl("DropDownList3ID");
    // here get the datasource for ddl3 according to ddl1.SelectedValue
    ddl3.DataSource = GetDataSource(ddl2.SelectedValue);
    ddl3.DataBind();
}
How to bind Dropdown list by changing item in another dropdown in mvc using jquery

How to bind Dropdown list by changing item in another dropdown in mvc using jquery


By : aurore
Date : March 29 2020, 07:55 AM
like below fixes the issue I am trying to bind states based on country selection using jquery ajax and i am using just html select for states.
code :
<select class="selectpicker"></select>
use this:
$("#State").append(optionhtml).selectpicker('refresh');
How to bind a dropdown list according to another dropdown selected value using ajax in aspnet webforms

How to bind a dropdown list according to another dropdown selected value using ajax in aspnet webforms


By : guo yangtao
Date : March 29 2020, 07:55 AM
With these it helps We have a .aspx page with two HTML SELECT element and we want to load countries in one dropdownlist and load cities of a country in the other. , To get cmb_Region value
code :
var regionId = $('#<%= cmb_Region.ClientID %>').val();
[WebMethod]
public static string GetCities(int RegionId)
{
    behbimeh_informationEntities db = new behbimeh_informationEntities();
    var cities=  db.City.Where(i => i.region_id == RegionId).Select(item=>new { item.ValueField, item.TextField }).ToList();
    return Newtonsoft.Json.JsonConvert.SerializeObject(cities);
}
<script type="text/javascript">
function GetCitiesOfRegion(regionId)
{
    $.ajax({
        url:"Signup.aspx/GetCities",
        type:"POST",
        data:'{"RegionId":'+regionId+'}',           
        success: function (r) {
            var cities=JSON.parse(r.d);
            var citiesOptions="";
            for(var i=0;i<cities.length;i++){
                 citiesOptions+='<option value="'+cities[i].Value+'">'+cities[i].Text+'</option>';
            }
            $('#<%= cmb_City.ClientID %>').html(citiesOptions);
        }
        });
}
how to bind the enum types of dropdown to the Dropdown list?

how to bind the enum types of dropdown to the Dropdown list?


By : user4293905
Date : March 29 2020, 07:55 AM
Hope this helps , I think your only option is to map the enum values to an object:
Related Posts Related Posts :
  • Why do I get a COMException when I try to initialize an Interop.Word.Application?
  • Finding subtotal for column in repeater control
  • dropdownlist item selected throw exception (stack empty)
  • How can I list IIS working processes programmatically?
  • How to access nested object from JSON with Json.NET in C#
  • OpenXml DataValidation set predefined List for columns
  • How to find recurring word groups in text with C#?
  • layout conrols to developp universal apps in windows 8.1 pro
  • Adding strings to a list via for loop xna
  • Using Vertex Arrays with OpenTK
  • Optimizing List<string>
  • C# Local variables
  • How can I merge the results of a group by Linq-to-XML query?
  • How to add Report in ASP.NET Project
  • C# How to display all instances of a loop in a label?
  • C# subscribe a function to System.Action that is subscribed to another System.Action: why does order matter?
  • Is there any negative effect to setting SqlCommand's CommandTimeout to a high value?
  • C# - TreeView Context Menu Out of Place when using keyboard
  • How to read stored procedure output and return it as list
  • How do you maintain changes made by VisualState triggers after setting another VisualState?
  • Should I be unit testing my bootstrapper and if so how?
  • using .SingleOrDefault() inside .Where() will raise the following exception:- System.NotSupportedException was unhandled
  • C# How would I fill a Form1 Parameter in the same seperate class
  • Access gridview row's data from LinkButton inside that row
  • Translating excel function to c# Math.pow not resulting in same values
  • Arranging Ten Inputted Numbers into Ascending and Descending order
  • AsEnumerable and Query Syntax
  • How can I defensively code against randomly referencing "Table 0" and null values?
  • Changing xaml code position based on screen size
  • Castle Windsor resolve ienumerable and name
  • Drawing multiple sprites with a for loop xna 4.0
  • For loop to Populate Textblocks
  • Visual Studio 2015: Create an Empty Project
  • What are .NET classes to replace the old MSXML2.ServerXMLHTTP?
  • Handle leak in .Net threads
  • Excel add-in ribbon click events bubbling
  • validation rule needed for only numbers to be entered
  • Parsing complex XML, no descendent elements exists when selecting a named element
  • Web Api - IEnumerable with complex type as param is null
  • Email address input validation
  • .Net AND operator Regular Expression using strings in a document
  • Windows phone 8.1 POST x-www-form-urlencoded not working
  • Is there any way to make my C# XMLManager work?
  • ASP.NET 5 Console Application (package) - How to create DBContext from connection string?
  • How to use form's function in other class C#
  • WPF Zebra EPL2 Printing issue
  • C# use reflection to capture exception throw
  • Convert strings in DataRow to double
  • Xml-Serialization is not working
  • HTML Agility Pack can't find classes with trailing spaces
  • ComputeHash Calls Inexplicably Differ
  • Creating an array that holds both integers and datetime C#
  • GroupBy multiple columns in Linq with Take()
  • Rename multiple symbols at once? (using Roslyn)
  • Cast lambda in delegate
  • DataContractSerializer using default properties
  • LINQ Query Sum in recordset
  • change left-hand boolean value to be opposite of the right hand value
  • Get node from XmlDocument using xpath
  • Why does a Control's BeginInvoke() target delegate never occur after Dispose() is called on the Control?
  • shadow
    Privacy Policy - Terms - Contact Us © animezone.co