Search Results

Search found 2 results on 1 pages for 'mahr g mohyuddin'.

Page 1/1 | 1 

  • jqGrid adding new row with XML Data

    - by mahr.g.mohyuddin
    Hi Everyone, I am using jQGrid in my ASP.NET MVC application with add row feature. My problem is I have to save XML data in some of the row fields. But while posting the new row with some fields having plain xml, to server I get Internal server error. By default jqGrid perhaps expects json or text data to be posted on server while adding a new row. I used beforeSubmit method for workaround to convert xml first to json and then send to server, but while converting json back to xml I lose the orginal structure of the xml. FYI: I used JsonReaderWriterFactory on server to convert it back. Your help will be highly appreciated. Thanks.

    Read the article

  • Custom RoleProvider: Can't insert record in UsersInRole Table

    - by mahr.g.mohyuddin
    Hi, I have implemented a LINQ to SQL based RoleProvider, when I assign role to a user following exception is thrown while AddUsersToRoles method is called. I have defined a composite primary key userid & roleId on this table, it still throwing this exception: Can't perform Create, Update or Delete operations on 'Table(UsersInRole)' because it has no primary key. My LinQ to SQL implementation of AddUsersToRoles method is as follows. It breaks at db.UsersInRoles.InsertOnSubmit(userInRole); using (RussarmsDataContext db = new RussarmsDataContext()) { List<UsersInRole> usersInRole = new List<UsersInRole>(); foreach (string username in usernames) { foreach (string rolename in rolenames) { UsersInRole userInRole = new UsersInRole(); object userId = ProvidersUtility.GetUserIdByUserName(username,applicationName); object roleId = ProvidersUtility.GetRoleIdByRoleName(rolename,applicationName); if (userId != null && roleId != null) { userInRole.UserId = (Guid)userId; userInRole.RoleId = (Guid)roleId; db.UsersInRoles.InsertOnSubmit(userInRole); } } } try { // db.UsersInRoles.InsertAllOnSubmit(usersInRole); db.SubmitChanges(); } catch (ChangeConflictException) { db.ChangeConflicts.ResolveAll(RefreshMode.OverwriteCurrentValues); db.SubmitChanges(); } } Any help will be appreciated. Thanks.

    Read the article

1