locked
After Updating To CU3 - larger text box RRS feed

  • Question

  • Hi,

    After Updating To CU3 - larger text box we are not able to make larger text box like in the previous updates.

    We have used this article but after it's always throwing an error: “The given key was not present in the dictionary.”

    Have you been experiencing this situation?

    Regards

    Migmax

    Friday, May 13, 2016 5:47 PM

Answers

  • I think you copied whole line as it in makeform.cshtml from above post, you need to change only tags. Just replace "<input":"</input>" string to "<textarea":"</textarea>"
    Saturday, May 14, 2016 4:37 PM
  •    you are not good at copy paste, mistake in your first line,

      else if (item["Prompt"].ToString().Equals("Description")

       if should be Prompt and not Type! 

       Also another piece of suggestion. Don't user Equals use Contains condition. Which will automatically convert all inputs containing description into bigger box.

      Just the description does not look good in all cases.


    Shahid Roofi

    • Marked as answer by Migmax Wednesday, May 18, 2016 10:19 AM
    Monday, May 16, 2016 12:27 PM

All replies

  • I think you copied whole line as it in makeform.cshtml from above post, you need to change only tags. Just replace "<input":"</input>" string to "<textarea":"</textarea>"
    Saturday, May 14, 2016 4:37 PM
  •    yes it works on CU3 also. can confirm that.


    Shahid Roofi

    • Proposed as answer by Shahid Roofi Saturday, May 14, 2016 9:29 PM
    Saturday, May 14, 2016 9:29 PM
  • Hi,

    I have tried your suggestion. I am using the following code:

     else if (item["Type"].ToString().Equals("Description"))
                        {
    						<label for="@item["Prompt"].ToString()" data-required="@item["Optional"].ToString()">@item["Prompt"].ToString()</label>
    						<textarea cols="40" rows="10" name="@item["PathSend"].ToString()" id="@item["Prompt"].ToString()" @item["Optional"].ToString() @item["ReadOnly"].ToString() value='@Request[item["PathSend"].ToString()]'></textarea>
    						<div class="error-text">@ErrorResults.Find(m => m.MemberNames.ElementAt(0).Equals(item["PathSend"].ToString()))</div>
    					}

    Now the error we are getting is:

    Server Error in '/' Application.

    Object reference not set to an instance of an object.
      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

     Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:


     An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       Microsoft.EnterpriseManagement.NewSMPortal.SDKTransformer.SMPortalHelper.SMPortalHelper..ctor() +287
       SelfServicePortalWebApp.Controllers.SelfServicePortalBaseController.OnActionExecuting(ActionExecutingContext filterContext) +226
       SelfServicePortalWebApp.Controllers.HomeController.OnActionExecuting(ActionExecutingContext filterContext) +15
       System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) +99
       System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__31(AsyncCallback asyncCallback, Object asyncState) +269
       System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
       System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters, AsyncCallback callback, Object state) +270
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState) +774
       System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +171
       System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +410
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState) +46
       System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +171
       System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +539
       System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +171
       System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +464
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState) +127
       System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +171
       System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +342
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +921
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +137

     What can we possibly be doing wrong?

    As a reminder, this is a fresh installation of CU3, i.e  no CUs were installed before.

    Thanks in advance!

    Migmax

    Monday, May 16, 2016 10:38 AM
  •    you are not good at copy paste, mistake in your first line,

      else if (item["Prompt"].ToString().Equals("Description")

       if should be Prompt and not Type! 

       Also another piece of suggestion. Don't user Equals use Contains condition. Which will automatically convert all inputs containing description into bigger box.

      Just the description does not look good in all cases.


    Shahid Roofi

    • Marked as answer by Migmax Wednesday, May 18, 2016 10:19 AM
    Monday, May 16, 2016 12:27 PM
  • Hi there,

    Thanks for your kind remarks. I will take them into account.

    The situation has been solved.

    Regards

    Migmax 

    Wednesday, May 18, 2016 10:19 AM