Click here to Skip to main content
15,949,686 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ListSearchExtender not working Pin
Christian Graus1-Jan-09 3:07
protectorChristian Graus1-Jan-09 3:07 
GeneralRe: ListSearchExtender not working Pin
N a v a n e e t h1-Jan-09 3:19
N a v a n e e t h1-Jan-09 3:19 
GeneralRe: ListSearchExtender not working Pin
Christian Graus1-Jan-09 3:23
protectorChristian Graus1-Jan-09 3:23 
QuestionGetting HTML result of Custom User Control for use in an email Pin
Justin Porteous1-Jan-09 1:40
Justin Porteous1-Jan-09 1:40 
AnswerRe: Getting HTML result of Custom User Control for use in an email Pin
N a v a n e e t h1-Jan-09 1:47
N a v a n e e t h1-Jan-09 1:47 
GeneralRe: Getting HTML result of Custom User Control for use in an email Pin
Justin Porteous1-Jan-09 2:02
Justin Porteous1-Jan-09 2:02 
GeneralRe: Getting HTML result of Custom User Control for use in an email Pin
Justin Porteous1-Jan-09 2:04
Justin Porteous1-Jan-09 2:04 
AnswerRe: Getting HTML result of Custom User Control for use in an email Pin
Justin Porteous1-Jan-09 2:02
Justin Porteous1-Jan-09 2:02 
After posting this I decided to play a little more, and I think I got it, hope this helps someone...

I created a user control in the folder "Controls" called "WebUserControl.ascx".
I decided if I could write the control programatically to the page, I could then use that variable later for the email section.

Here is the code I came up with... if anyone can better it, please post here:
using System;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Text;
using System.IO;


public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Text.StringBuilder stringBuilder = new StringBuilder();
        StringWriter stringWriter;
        HtmlTextWriter htmlTextWriter;
        stringWriter = new System.IO.StringWriter(stringBuilder);
        htmlTextWriter = new HtmlTextWriter(stringWriter);
        
        Control c1 = LoadControl("Controls/WebUserControl.ascx");
        c1.DataBind();

        c1.RenderControl(htmlTextWriter);
        Response.Write (htmlTextWriter.InnerWriter.ToString());

    }
}


J
- Artificial intelligence is no match for natural stupidity

Questiondynamically adding values to RadioButton Pin
premprakashbhati1-Jan-09 1:12
premprakashbhati1-Jan-09 1:12 
AnswerRe: dynamically adding values to RadioButton Pin
Christian Graus1-Jan-09 2:30
protectorChristian Graus1-Jan-09 2:30 
QuestionProblem with Culture Pin
Royal Ludhiana31-Dec-08 23:57
Royal Ludhiana31-Dec-08 23:57 
AnswerRe: Problem with Culture Pin
Abhijit Jana1-Jan-09 0:05
professionalAbhijit Jana1-Jan-09 0:05 
QuestionHow To Implement NAT in P2P Web Based Chat Application Pin
indramca31-Dec-08 22:18
indramca31-Dec-08 22:18 
AnswerRe: How To Implement NAT in P2P Web Based Chat Application Pin
Abhijit Jana31-Dec-08 23:17
professionalAbhijit Jana31-Dec-08 23:17 
QuestionMulti Language Website Pin
yogesh_kumar_agarwal31-Dec-08 21:42
yogesh_kumar_agarwal31-Dec-08 21:42 
AnswerRe: Multi Language Website Pin
Abhijit Jana31-Dec-08 23:15
professionalAbhijit Jana31-Dec-08 23:15 
QuestionCS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error Pin
Rameez Raja31-Dec-08 20:18
Rameez Raja31-Dec-08 20:18 
AnswerRe: CS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error [modified] Pin
mmdullah31-Dec-08 20:28
mmdullah31-Dec-08 20:28 
AnswerRe: CS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error Pin
Nishant Singh31-Dec-08 20:30
Nishant Singh31-Dec-08 20:30 
AnswerRe: CS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error Pin
meeram39531-Dec-08 20:32
meeram39531-Dec-08 20:32 
GeneralRe: CS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error Pin
N a v a n e e t h31-Dec-08 20:43
N a v a n e e t h31-Dec-08 20:43 
GeneralRe: CS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error Pin
Rameez Raja31-Dec-08 21:35
Rameez Raja31-Dec-08 21:35 
GeneralRe: CS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error Pin
N a v a n e e t h31-Dec-08 21:52
N a v a n e e t h31-Dec-08 21:52 
GeneralRe: CS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error Pin
Christian Graus1-Jan-09 2:01
protectorChristian Graus1-Jan-09 2:01 
AnswerRe: CS0118: 'objDR' is a 'variable' but is used like a 'method' Compilation Error Pin
Christian Graus1-Jan-09 2:02
protectorChristian Graus1-Jan-09 2:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.