.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

redirecting from EditForm.aspx. to NewForm.aspx directly

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :SharePoint

Hi All,

My Requirement is...

I have two lists. List "Project Request" and "Project List". When I am upading a item from "Project Request" list in EditForm.aspx. After clicking on the ok the aplication should redirect me to NewForm.aspx of ProjectList.

I have checked in so many blogs it can be achieved through EventReciver only. But not able to ressolve how to achive.

Please help me with code snippet.

Thanks in Advance.....


View Complete Post

More Related Resource Links

SharePoint 2007, Modify Tooltip Text in SharePoint forms: EditForm.aspx and NewForm.aspx

I have a list in SharePoint that was created awhile back.  The names assigned to some of the columns in the list are no longer relevant.  Due to existing code, the column names cannot be modified to reflect the preferred names.  I was able to change the lables assiciated with these fields within forms NewForm.aspx and EditForm.aspx.  All looks and works just fine except for when the curser lingers in one of these fields, the tooltip that appears contains the underlining (original...no longer relevant) column names.  This is confusing to the user since the name within the lable and the tooltip are different.  I would like a way to either disable the tooltip from displaying or to modify it to display a custom value.  Below is the code from behind the form as it appears in Sharepoint Designer.  I would appreciate some input on this. <SharePoint:FormField runat="server" id="ff11{$Pos}" ControlMode="Edit" FieldName="My_x0020_Field_x0020_Name" __designer:bind="{ddwrt:DataBind('u',concat('ff11',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@My_x0020_Field_x0020_Name')}"/> <SharePoint:FieldDescription runat="server" id="ff11description{$Pos}" FieldName="My_x0020_Field_x0020_Name" ControlMode="Edit"/>

IIS Crash when open newform.aspx directly


We’re facing problem with SharePoint NewForm.aspx at both Dev & Test environment , this problem can be reproduce as follow :

1.       IIS Reset
2.       Open any new “Newform.aspx” DIRECTLY EG. http://TestServer/Lists/TestList/NewForm.aspx

System will not response and crashed.

There is one event log as follow :
Faulting application w3wp.exe, version 6.0.3790.3959, stamp 45d691cc, faulting module kernel32.dll, version 5.2.3790.4480, stamp 49c51cdd, debug? 0, fault address 0x0000000000027ded.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

This happen to ALL list regardless of any site collection, but if I go to allitems.aspx and click new item, this works fine…

Software :
Windows 2003 SP2
MOSS 2007 SP2

Any ideas?

Want to create a content type with its own Newform.aspx,editform.aspx,allitems.aspx by means of wiza



The wizard then creates a solution on visual studio. The code behind will write generic code for updating/adding into sharepoint.i is there a wizard which will create content type with individual aspx ? If there is a wizard utility which prompts you for fields and field types and then it will create code behind for the aspx.
With this done I can go at the code behind and ammend to put more logic. 


Getting user control in NewForm.aspx of the list


I have designed a user control where i have placed some custom fields as per my requirement now my next step is as soon as user clicks 'Create' under Site Settings it should take him to my user control page instead of Newform.aspx default page of the list.Just let me know your suggestions to achieve this as it would help me a lot

Thanks & Regards,


how to hide/display controls in NewForm.aspx based on dropdown value in SharePoint list



I have 1 dropdown in my sharepoint list with other columns. If dropdown value equal to 'xyz' i need to display some other controls, otherwise these controls should be hidden.

I know we can achieve this with javascript. If any one can provide code or sample then it will be appreciated. or is there any other alternative methods to do this ........

Thanks & Regards, Neerubee

Custom Editform.aspx crashes Sharepoint Designer

Hi there,

I've recently designed a sharepoint list and customised newform.aspx and editform.aspx. I made copies of the originals then customised the copies.
On both forms I simply:

* Closed original List Form web part
* Added Custom List Form
* Added some section breaks (<tr>) to the form to break it into sections
* Added a new css style to change the background colour on the section breaks (table rows)

Now NewForm.aspx works fine. However after making above changes in EditForm.aspx, I saved it. However whenever I try to reopen EditForm.aspx in Sharepoint Designer (SD), SD crashes! I can only open it in Text view. The error details reported by SD are:

Problem signature:
  Problem Event Name:    APPCRASH
  Application Name:    SPDESIGN.EXE
  Application Version:    12.0.6423.1000
  Application Timestamp:    49b09947
  Fault Module Name:    FPEDITAX.DLL
  Fault Module Version:    12.0.6423.1000
  Fault Module Timestamp:    49b098d3
  Exception Code:    c0000005
  Exception Offset:    0010b35c
  OS Version:    6.0.6002.
  Locale ID:    3081

Additional information about the problem:
  LCID:    1033
  Brand:    Office12Crash
  skulcid:    1033

I really don't know why SD is crashing. As a test I made a new

Sharepoint editform.aspx will not allow to change

I wanted to updated my editform.aspx but was warned to make a backup first which I did so I saved editform.aspx as editform_original.aspx.   I edited editform.aspx just the way I want it, went to my sharepoint list and clicked my edit button and it now loads editform_original.aspx. how do I point this back to editfor.aspx? Okay so just to be clear I opened editform.aspx saved as editform_original.aspx in same folder Edited editform.aspx with my changes have tried to set default edit screen to editform.aspx from editform_orignal.aspx and it will not take

NewForm.aspx - Show/Hide fields dynamically

I have about 20 + fields in a custom list.  I want to be able to show and hide fields depending on user selection.  Does anyone know a way of accomplishing this? Ive tried some embedded javascript but can't seem to get it working in sharepoint. Please help :)http://lbellows.blogspot.com http://www.ptreviews.net

Redirecting default.aspx to root virtual directory

I have a simple ASP.NET 3.5 application running under IIS7 under a virtual directory. So the URL of my app is like http://site.com/app. I want to 301-redirect the request to site.com/app/default.aspx to site.com/app for better SEO. I have to do this redirect through code only, not by any IIS settings. I am unable to do so via code mentioned in this article:http://www.4guysfromrolla.com/articles/072810-1.aspxThe code:if (request.RawUrl.Equals("/default.aspx")) { newUrl = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Url.Authority, request.RawUrl.Remove(request.RawUrl.LastIndexOf("/default.aspx", StringComparison.OrdinalIgnoreCase))); context.Response.Status = "301 moved permanently"; context.Response.AddHeader("Location", newUrl); } seems to go into an infinite loop when the application is under a virtual directory. the request.RawUrl property always returns "/default.aspx" even after a 301 redirect causing the infinite loop. How can I fix this issuhttp://forums.asp.net/AddPost.aspx?ForumID=27e?

How do I change the order of column names in EditForm.aspx

I have an Announcements list to which I've added extra columns: Publish (date), De-Publish (date), and Category (choice).  When I go to EditForm.aspx, the columns display in this order: Title , Body, De-Publish , Category and Publish . I'd like to change the order of the columns on EditForm.aspx so that it is Title, Body, Category, Publish and De-Publish . Changing the All Items view doesn't do it. How might I change the order of columns that is shown to the user?


Hello, in my lists, i'm trying to figure out how to open the Newform.aspx in a new window. I've read all other  solutions but they don't seem to be very clear. What i want is when a user clicks on a the new button (Add a new item to this list) the form should open in a new window, and then once its been completed, and the user clicks ok, it should refresh the page and redirect to the AllTtems.aspx with the new list item that was created displayed. Please if anyone has a code to perform this. Help. Thanks for your assistance -Ug

change focus on controls in sharepoint list newform.aspx

hi all. i have newform.aspx where i hav required fields . when i say ok to enter the values the required field valiedates and shows error messages. but the problem is that the focus where it is suppose to get placed is promting in differnet place. can i change the focus of the controls inside newform.aspx or editform.aspx?jayaraja

Modifying Customizing EditForm.aspx of Doc lib breaks Upload function - Unknown Error

Part of a bigger design issue really. But does anybody know why customizing EditForm.aspx of a Doc lib breaks the Upload function? and how to fix it so it does not. My version of the editform works great, but after an upload I get Unknown Error the resulting url looks like this: https://xxxxx.edu/sites/xxxx/_layouts/Upload.aspx?List=%7b0404432B-91A3-4E18-9202-5954E3A7E0D2%7d&RootFolder=%2fsites%2fmcpharm%2ftest3&Source=https%3a%2f%2fxxxxx.edu%2fsites%2fmcpharm%2ftest3%2fForms%2fAllItems.aspx --- The bigger design issue - disregard if you like: That said, the bigger design issue is we are trying to relate one list row to many documents, but don't want to seperate the docs into seperate folders and would like the solutoin to be seamless. We are going to add a look up from the doc lib to the list, but did not want to use anythng but the List's ID column. However, we do not want users to have to manually look up List row IDs in that form, and we did not want to use a list column that can be edited, even if we can add a unique column policy. My design and thinking is to build a few custom pages with dataviews to show row level details in both lists (1 to many) and a dataview to drive list level functions like edit, delete and upload docs. I think all the pieces are there except for the less than graceful upload function that fist uploads the file and then asks the

How to add a new button to the newform.aspx page which says "Save and add another record" ?

Team, I have a scenario where my client wants me to add a nother button to NewForm.aspx page in addition to Save and Cancel buttons. The job of that buttom should be to save the record and open that new form again. Is this possible.If yes can you guie me how to do it though designer? Thanks in advance. Deepti.  

A customized EditForm.aspx page giving error because it has a "People and Group" field with a "Allow

My customized EditForm.aspx which has a "People and Group" column with the "Allow multiple selections" property as "Yes" was working fine until the Agusust cumulative update was applied into the MOSS server. Now it's giving me the error: "An unexpected error has occurred". Needless to say, when I change the "Allow multiple selections" property to "No", the customized EditForm.aspx page works fine.Forgetting whyMicrosoft introduced this error for now, is there a workaround that you are awre of?

How to preset lookup value in newform.aspx?

Trying to preset value of "contract" value in "payments" newform.aspx: var tmp = new Array();   var tmp2 = new Array();   var get = location.search; if(get != '') {  tmp = (get.substr(1)).split('&');  for(var i=0; i < tmp.length; i++) {   tmp2 = tmp[i].split('=');    if (tmp2[0]="contract")   {    document.getElementById("ctl00_m_g_74acdc2d_d0d7_40f0_92fe_591f907f295a_ctl00_ctl05_ctl03_ctl00_ctl00_ctl04_ctl00_ctl01").value=tmp2[1];    break;   }  } } User see that correct value (translated through url) is choosed. But after user saves new item, it's appers with empty value of "contract" field.

how to do a ajax integrated validation in required field sharepoint newform.aspx

hi all, i have newform.aspx in sharpeoint list where in i have 2 cols which are reqd field. how would i make the server side validation without refreshing the page.. can i put it ajax update panel ?  how would i achieve this requirement.jayaraja
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend