Search Results

Search found 346 results on 14 pages for 'mazhar ahmed'.

Page 5/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • asp.net mvc multiple fckeditors field

    - by mazhar kaunain baig
    how to add multiple fckeditor field on asp.net mvc page ok here is the code <% foreach (var OrganizationMeta in ((IEnumerable<Egovt.Models.OrganizationMeta>)ViewData["OrganizationMeta"])) { %> <% if (OrganizationMeta.vcr_DateType == "text") { %> <% TempData["OrganizationMeta"] = OrganizationMeta.vcr_MetaKey + Lang.int_LangId; %> <% Html.RenderPartial("ControlRender"); %> <% } %> <% } %> </div> controlrender <script src="<%= Url.Content("~/Content/js/fck/fckeditor.js") %>" type="text/javascript"></script> <script type="text/javascript"> window.onload = function() { var sBasePath = '<%= Url.Content("~/Content/js/fck/") %>'; var oFCKeditor = new FCKeditor('<%=TempData["OrganizationMeta"] %>'); oFCKeditor.BasePath = sBasePath; oFCKeditor.ReplaceTextarea(); } </script> <%= Html.TextArea(TempData["OrganizationMeta"].ToString(),"", new { @name = TempData["OrganizationMeta"] })%> How will i implement it

    Read the article

  • asp.net mvc HttpPostedFileBase getting file extension

    - by mazhar kaunain baig
    public string ContructOrganizationNameLogo(HttpPostedFileBase upload, string OrganizationName, int OrganizationID,string LangName) { var UploadedfileName = Path.GetFileName(upload.FileName); string type = upload.ContentType; } I want to get the extension of the file to dynamically generate the name of the file.One way i will use to split the type. but can i use HttpPostedFileBase object to get the extension in the clean way?

    Read the article

  • Cannot add an entity that already exists.

    - by mazhar
    Code: public ActionResult Create(Group group) { if (ModelState.IsValid) { group.int_CreatedBy = 1; group.dtm_CreatedDate = DateTime.Now; var Groups = Request["Groups"]; int GroupId = 0; GroupFeature GroupFeature=new GroupFeature(); foreach (var GroupIdd in Groups) { // GroupId = int.Parse(GroupIdd.ToString()); } var Features = Request["Features"]; int FeatureId = 0; int t = 0; int ids=0; string[] Feature = Features.Split(',').ToArray(); //foreach (var FeatureIdd in Features) for(int i=0; i<Feature.Length; i++) { if (int.TryParse(Feature[i].ToString(), out ids)) { GroupFeature.int_GroupId = 35; GroupFeature.int_FeaturesId = ids; if (ids != 0) { GroupFeatureRepository.Add(GroupFeature); GroupFeatureRepository.Save(); } } } return RedirectToAction("Details", new { id = group.int_GroupId }); } return View(); } I am getting an error here Cannot add an entity that already exists. at this line GroupFeatureRepository.Add(GroupFeature); GroupFeatureRepository.Save();

    Read the article

  • using 3rd party dll in enterprise web based application?

    - by mazhar
    I found a great control with example here for mvc It fulfills all my requirement but the problem is that it uses a js tree dll. Should I go on and used that example in my application? Do you people refrain from using 3rd party free dll in applications? How will I tell that it will not expire or not cause problem later on Forgive me if this is inappropriate question but thx in advance for any appropiate reply on this topic. just trying to get the point of view of you people on this

    Read the article

  • asp.net mvc DataViewModel Problem no insert and edit

    - by mazhar
    using the code DataViewModel with one form for create and edit with partial view , in the code below In the create*I am not able to enter the values to the database*,In the edit Mode I am not able to display the value as well in the textboxes for edit public class OrganizationGroupFormViewModel { // Properties public OrganizationGroup OrganizationGroup { get; private set; } public OrganizationGroupFormViewModel(OrganizationGroup organizationGroup) { OrganizationGroup = organizationGroup; } } public class OrganizationGroupsController : Controller { // // GET: /OrganizationGroups/ OrganizationGroupsRepository OrganizationGroupRepository = new OrganizationGroupsRepository(); OrganizationUsersDataContext _db = new OrganizationUsersDataContext(); public ActionResult Create() { try { OrganizationGroup OrgGroup = new OrganizationGroup() { int_CreatedBy=1, dtm_CreatedDate=DateTime.Now }; return View(new OrganizationGroupFormViewModel(OrgGroup)); } catch { return View(); } } [HttpPost] public ActionResult Create(OrganizationGroup OrgGroup) { if (ModelState.IsValid) { OrgGroup.int_CreatedBy = 1; OrgGroup.dtm_CreatedDate = DateTime.Now; OrganizationGroupRepository.Add(OrgGroup); OrganizationGroupRepository.Save(); return RedirectToAction("Details", new { id = OrganizationGroupRepository.int_OrganizationGroupId }); } return View(new OrganizationGroupFormViewModel(OrgGroup)); } // // GET: /OrganizationGroups/Edit/5 public ActionResult Edit(int id) { try { var OrgGroup = _db.OrganizationGroups.First(m => m.int_OrganizationGroupId == id); if (ModelState.IsValid) { OrgGroup.int_ModifiedBy = 1; OrgGroup.dtm_ModifiedDate = DateTime.Now; } return View(new OrganizationGroupFormViewModel(OrgGroup)); } catch { return View(); } } // // POST: /OrganizationGroups/Edit/5 [HttpPost] public ActionResult Edit(int id, FormCollection collection) { try { var OrgGroup = _db.OrganizationGroups.First(m => m.int_OrganizationGroupId == id); if (ModelState.IsValid) { OrgGroup.int_ModifiedBy = 1; OrgGroup.dtm_ModifiedDate = DateTime.Now; TryUpdateModel(OrgGroup); OrganizationGroupRepository.Save(); } return RedirectToAction("Details", new { id = OrgGroup.int_OrganizationGroupId }); } catch { return View(); } } Create View; <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Egovst.Controllers.OrganizationGroupFormViewModel>" %> Create Organization Group <h2>Create</h2> <%= Html.ValidationSummary(true) %> <div> <% Html.RenderPartial("OrganizationGroup"); %> </div> Organization Group User Control <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Egovst.Controllers.OrganizationGroupFormViewModel>" %> <% using (Html.BeginForm()) {%> <%= Html.ValidationSummary(true) %> <fieldset> <legend>Fields</legend> <div class="editor-label"> Organization Group Name: </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.OrganizationGroup.vcr_OrganizationGroupName)%> <%= Html.ValidationMessageFor(model => model.OrganizationGroup.vcr_OrganizationGroupName)%> </div> <div class="editor-label"> Organization Group Description: </div> <div class="editor-field"> <%= Html.TextAreaFor(model => model.OrganizationGroup.vcr_OrganizationGroupDesc)%> <%= Html.ValidationMessageFor(model => model.OrganizationGroup.vcr_OrganizationGroupDesc)%> </div> <p> <input type="submit" value="Save" /> </p> </fieldset> <% } %>

    Read the article

  • asp.net viewdata

    - by mazhar
    public ActionResult AddDinner() { Dinner dinner = dinnerRepository.GetDinner(id); ViewData["dinner"] = repository.AllDinners(); return View(dinner); } 1) First of all both the dinner object and the ViewData["dinner"] is passing to the view? 2) Secondly how would I iterate over the ViewData["dinner"] in the view?

    Read the article

  • asp.net mvc dataannotation different table

    - by mazhar kaunain baig
    i have a lang table which is as a foreign key in the link table , The link can be in 3 languages meaning there will be 3 rows in the link table everytime i enter the record. i am using jquery tabs to enter the records in 3 languages . ok so what architecture i should follow for validation with datannotation attributes. i am using link to sql with 2010 vs. i will be creating link class with MetadataType so how will i handle for eg link name attribute 3 times.

    Read the article

  • asp.net ajax call onsuccess

    - by mazhar kaunain baig
    <% using (Ajax.BeginForm("EditOrganizationMeta", new AjaxOptions { UpdateTargetId = OrganizationMeta.vcr_MetaKey + Lang.int_LangId })) { % In addition to that call can i make onsuccess call as well with beside it.First it will run? and then on success will?

    Read the article

  • asp.net mvc getting id of button clicked

    - by mazhar kaunain baig
    <div id="4591" > <input type="text" id="Title1" name="Title1" value="a" /> <input type="submit" name="button" value="Save" /> </div> <div id="4592" > <input type="text" id="Title2" name="Title2" value="a" /> <input type="submit" name="button" value="Save" /> </div> <div id="4593" > <input type="text" id="Title3" name="Title3" value="a" /> <input type="submit" name="button" value="Save" /> </div> This is the copy paste version of the html source generated by the browser which is making it clear that i am generating the dynamic fields on the page. name in the textbox is the field in the database. After pressing the one of the save buttons how would i send the particular textbox name and value to the controller action to be updated.

    Read the article

  • asp.net mvc select list

    - by mazhar
    ok what i want to do is to using forcollection["Selectlist"] only selected things in the select list will be availabe when the form posted i am using add ,remove mechanism in my listbox , so i want to make everything that is there in the checkbox as available to the forcollection["Selectlist"]. can it be done?

    Read the article

  • asp.net mvc checkbox hierarchy

    - by mazhar
    I want to create a checkboxes hierarchy like this in mvc2.How would I be able to achieve this in the most simplest manner. Administrator Manage User Add Edit Delete View Manage Feature Add Edit Delete View Moderator Manage User Add Edit Delete View Manage Feature Add Edit Delete View

    Read the article

  • ASP.NET MVC DataAnnotations different tables. Can it be done?

    - by mazhar kaunain baig
    i have a language table which is as a foreign key in the link table , The link can be in 3 languages meaning there will be 3 rows in the link table every time i enter the record . i am using jQuery tabs to enter the records in 3 languages . OK so that thing is that there will be three text boxes for every field in the table.link name field will have 3 text boxes, description will have 3 text boxes and so on. i am using LINK to SQL with VS2010. i will be creating link class with MetadataType so how will i handle for eg link name attribute 3 times

    Read the article

  • difference between mvc1 and mvc2

    - by mazhar
    q1) what is difference between mvc1 and mvc2 ? q2) everything that is in mvc1 is in mvc2?I am asking this question because there is a debate in my place of work as we can find many resources and ebooks on mvc1 not mvc2 so we should use mvc1 in our portal. q3) same ajax functionality can be implemented in web forms as well as in mvc or mvc2. or there is some limition in mvc?

    Read the article

  • jquery adding in select list by textbox

    - by mazhar
    ok what i am trying to do is to add something in the textbox and after pressing the add button it should go into the select list. how would i do that with jquery? I am not really able to make it work by your method .Please help? What i am doing wrong <%= Html.ListBox("FeatureLists", ViewData["FeatureListListBox"] as MultiSelectList)% $("#add").click(function() { var val = $("#txtaddfeature").val(); alert("aaa"); $("", { 'value': val, text: val }).appendTo("#FeatureLists"); //$("#textbox").val(''); here if you want to clear the value for next time });

    Read the article

  • checkboxes jquery

    - by mazhar
    <% foreach (var i in (IEnumerable)ViewData["Group"]) { % " / <%= i.vcr_GroupName % <% foreach (var ik in (IEnumerable)ViewData["Feature"]) { % " / <%= ik.vcr_FeaturesName % <% } % <% } % I have created this now the thing is that when I click on any parent with parentid=0 .all its child should automatically be clicked with parentid 0 but not viceversa.How would I do it in jquery? (Like i CLICK ON SOME FEATURE Manage User its child Add user ,edit and delete user should be clicked automatically ) but if i click on add user nothing should happened

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >