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

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

when to override CreateChildControl, PreRender, Render or RenderContents

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :SharePoint
can someone show me when to override CreateChildControl, PreRender, Render or RenderContents?   It seems to me I only need to override CreateChildControl to create and format controls to the web part. Am I right? But I've seen someone override both CreateChildControl and Render and doing something within them.   Also, should I override PreRender, instead of the Render, or RenderContents, if I don't use the CreateChildControl?   It just confuse me.   Thanks in advance.

View Complete Post

More Related Resource Links

animate effect work but the render items are messed up.


Hi all,

     I have a very unique problem, humm i think. I am using a jquery effect that animate bounce effect, i have a line in my javascript pageLoad function $("#UserBrowserInfoDIV").show('bounce'); - the effects run smoothly but what it does is mess up the bolded text in the div. I have try the items inside the div without bolding and it works fine and no render problem but when bolded the text that are bolded is quite messed up, and barely readable.

Please let me know is there anything else i can do i really would like use this effect.

P.S all the effect have the same render problem, and i am using ie8 under compatibility mode.





Foundations: Render Text On A Path With WPF


With Windows Presentation Foundation (WPF) you can lay out text on a path, then animate the individual points defining the path and watch the characters bounce around in response.

Charles Petzold

MSDN Magazine December 2008

Smart Clients: Build A Windows Forms Control To Consume And Render WSRP Portlets


Smart client apps use local resources, provide a rich client experience, and support intelligent install mechanisms. Web services offer powerful interoperability and integration features. Find out how to combine them to develop integrated apps that incorporate data from disconnected sources.

Carl Nolan

MSDN Magazine February 2006

MySqlMembershipProvider.CreateUser no suitable method found to override



I am getting following error while using MySqlMembership Provider. Can any one help me to solve this?


MySql.Membership.MySqlMembershipProvider.CreateUser(string, string, string, string, string, bool, object, ref System.Web.Security.MembershipCreateStatus)': no suitable method found to override.

        <membership defaultProvider="MySQLMembershipProvider">
                <add name="MyMembershipProvider"

        <roleManager enabled="true" defaultProvider="MySQLRoleProvider" />

using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Configuration.Provider;
using System.Data;
using System.Diagnostics;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using System.Web;
using System.Web.Configuration;
using System.Web.Security;
using MySql.Data.M

Virtual Override Abstract



can we have override, virtual and abstract with each other.

and  what are possible combinations of them which are possible........ ?????

can someone explain with an example ?????

override error message (The value 'test' is not valid for Age) when input incorrect data type for in


Hello everyone,

I've tried to override error message when input incorrect data type in input field on HTML form. For example I have the model like this.

public class Person
public string FirstName {get;set;}
public int Age {get;set;}


For view, I put text input for Age to get it value.

When type some string in Age text box like 'test' and press submit button. I got this error message

The value 'xxx' is not valid for Age

However, I want to change this message and try many way. There 's nothing effect this message value.

Please could you help me to solve this problem.

Formview + EditItemTemplate + Bind + PageLoad + Prerender = Confused


I am working with a formview edititemtemplate.  Currently in my page load, i have some stuff that would show or hide certain panels based on dropdownlist values.  These dropdown values get binded during page load.  I need to be able to change the values/dropdowns, without rebinding the old data, and updating the visibility of the panels based on predefined rules.

I have experimented with putting my formview.databind() in page load if isnotpostback, in prerender, in prerender if isnotpostback.   I have tried my rules (ex if ddlState.selectedvalue = "DE" then pnlDelaware.visible = "true") in the page load, and the page render.   I'm just not sure how to get the stars aligned here.

The closest i have come is having the databind in the pageload if notispostback, and the rules in the prerender.   However I get an error "dropdownlist has a SelectedValue which is invalid because it does not exist in the list of items.


Client validation, scrollTo override...


Using VS2005 (.NET 2.0), VB code behind,

I have a page with several required field validators + validation summary control(s). As noted in this post - when the client side validation runs the page gets scrolled to the top (window.scrollTo(0,0)). To change this behavior I implemented the second suggested alternative - I placed the following code at the bottom of my page:

    <script type="text/javascript">
        //Redefine the the window.scrollTo during the ValidationSummaryOnSubmit execution to avoid
        //  having the page scroll to the top...
        //  adapted from:http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=299399
        var ValidationSummaryOnSubmitOrig = ValidationSummaryOnSubmit;
        var ValidationSummaryOnSubmit = function() {
            var scrollToOrig = window.scrollTo;
            window.scrollTo = function() {}; //override with todo nothing
            var validationGroup = null;
            if (arguments.length>0) { //check for optional parameter
                if (arguments[0]) {
                    validationGroup = arguments[0];

No-Cache Meta override on one image


I am using this tag to hepl with my database calls <meta http-equiv="cache-control" content="no-cache" /> however I would like to override this meta tag for one large image using asp.net.  Can someone help me out? THANKS!

override of base class error please help!!!


i would really like to override http keepalives for my webservice and i found some source code that seems promising but i get an error that says

"function GetWebRequest" Cannot be declared override. 


    Protected Overrides Function GetWebRequest(ByVal uri As Uri) As WebRequest
        Dim webRequest = DirectCast(MyBase.GetWebRequest(uri), HttpWebRequest)
        webRequest.KeepAlive = False
        Return webRequest
    End Function

how do i implement this into my serivice and why im i getting this error??? in other words what in hell is the uri that i should be passing into this function.

Any assictance would be greatly appreciated.


Render X textboxes + Validation?

Hey there, How can I render X amount of textboxes and still have all of them to require a value at validation? I dont know the variable X.. so it could be 1, it could 50.

Page Header, PrintOnFirstPage=False, HTML render fine, PDF export leaves extra space

As it says in the header.Setup:SSRS 2008, VS 2008 SP1Local Mode, rdlc fileDesign:Make a 1/2" Page header with a text box in it. Set PrintOnFirstPage=FalseBody contains a Table that spans multiple "hard" pages.Results:Renders to HTML in the report viewer just fine.PDF export leaves blank 1/2" at the top of page 1. With no header for page 1, I had hoped it would remove the extra space the same as in the report viewer.Question:Any way to tell SSRS not to leave space when page header is turned off for the first page?Attempts:Tried putting everything in a rectange in the header and set the visibility to false. Still leaves space.

Overload POST with X-HTTP-Method-Override as DELETE

Hi, How do I pass POST with the override header, X-HTTP-Method-Override, which will say I really mean DELETE in REST WCF 3.5? What changes are needed exactly in server side REST code & where to make those changes exactly? Can some one post code snippet? Thanks!

Execute Process task - On Error (i want to override the error message)

Hi, In my package I am calling one exe to copy the files from local folders to SFTP. I am using a execute process task and I am passing the parameters like (address, username, password,....). The exe and syntax are given below. SFTPCopier.exe <<machinename>> <<username>> <<password> <<local directory path>> The problem is when the exe is failing to copy the files to SFTP due to some reason, the SSIS package is outputting the entire command in the log information (including the username & password). I dont want to write the password in the log information. I want to remove that password from the log information when an error occured in the execute process task. Can some one please tell me the way to override the message? Can I put a on error handler for that execute process task and use a script task to modify the "ErrorDescription" variable? Will that works? Thanks in advance.  

Render Transform and Rotate Transfomr

Hi everyone I want draw a polygon and aply the user rotatetransform and translate transform when KeyDown Handled, but I dont know why if i aply the rotate transfor and then the translate transform the Axis Y and axis X did change I use the follow code, the container is a Canvas:   Polygon PolygonView = new Polygon();p.Points.Add(  new Point(0, 0));p.Points.Add(  new Point(60, 0));p.Points.Add(  new Point(60, 40));p.Points.Add(  new Point((40) , 40));p.Points.Add(  new Point((40), Figure.HEIGHT));p.Points.Add(  new Point(0, 20));p.Fill =   new SolidColorBrush(Colors.Red);    private void UserControl_KeyDown(object sender, KeyEventArgs e) {    TranslateTransform tt = new TranslateTransform();   RotateTransform rt = new RotateTransform();      TransformGroup tg = new TransformGroup();   switch (e.Key) { case Key.Left: f.PosX -= 20; break; case Key.Right: f.PosX += 20; break; case Key.Down: f.PosY += 20; break; case Key.Up: rt.CenterX = f.PosX; rt.CenterY = f.PosY; rt.Angle += 90; break; } tt.X = f.PosX; tt.Y = f.PosY; PolygonView.RenderTransform = tg; } Some body help me please !!!! Thanks....."En Busqueda del con

Different number of data in Report after using Render method.

Hello All, I have CRM4 report that i execute from outside the CRM system, using the ReportExecutionService2005.asmx web service, i get the report exported directly by calling the Render method of the webservice, but when i compare the data of the Report outside the CRM is less then the data in the report executed from within CRM system. I have tested the same report with same user in CRM and outside CRM but data is different. can someone guide me what is going wrong in the Render method.BharatKumar Bambhaniya Software Developer.

override a css class in site

Hi, I have created a custom web part which i have deployed on as blog site . It uses the .ms-wpbody css class from main.css. But when i change the admin links css it also changes the css for the custom web part. I need to know is there a way the custom web part can custom css  and not the default. Is there a way to change the custom web part  css without  writing code.  
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