View Complete Post
MSDN Magazine July 2000
In essence, I am creating Dynamic Checkboxlist controls and adding them to a Panel. It works well when I do not have a Master Page configure to this webpage. Once I have a masterpage congifured.. I get a "Object Reference not set to instance of object" error on the Panel_Control.Controls.Add(Checkboxlistnew) line:
protected void Page_PreInit(object sender, EventArgs e)
XML OXML = new XML();
alistChkBoxLabels = OXML.XMLTransform("C:\\Documents and Settings\..\\Config_new.xml", "config_options/check_box/applications/app/@name");
int count = 1;
alistCheckisFacility = new ArrayList();
alIDTracker = new ArrayList();
while (count <= alistChkBoxLabels.Count)
Checkboxlistnew = new CheckBoxList();
Checkboxlistnew.ID = count.ToString();
Checkboxlistnew.Items.Add(new ListItem(alistChkBoxLabels[count - 1].ToString(), alistChkBoxLabels[count - 1].ToString()));
String sAppName = alistChkBoxLabels[count - 1].ToString().Trim();
alistCheckisFacility = OXML.XMLTransform("C:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio 2005\\WebSites\\User_Trial\\Config_new
I developed a page in VWD 2008 and it works perfectly locally, but when I deployed it on the server every Page.FindControl() call is causing the NullReference Exception "Object reference not set to an instance of an object. " Can anyone help me out? Code is below
For i As Integer = 1 To 10
If (CType(Page.FindControl("last_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("first_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("dob_" & i), TextBox).Text.Length > 0) Then
Dim person_entry(7) As String
person_entry(0) = info_list.Count - 1
person_entry(1) = CType(Page.FindControl("last_" & i), TextBox).Text
person_entry(2) = CType(Page.FindControl("first_" & i), TextBox).Text
person_entry(3) = CType(Page.FindControl("dob_" & i), TextBox).Text
person_entry(4) = CType(Page.FindControl("appear_" & i), TextBox).Text
person_entry(5) = CType(Page.FindControl("mental_" & i), TextBox).Text
person_entry(6) = CType(Page.FindControl("behave_" & i), TextB
I've created 2 custom lists. The 2nd list has a lookup column from the 1st list. In the new form page for this 2nd list, I've added the 1st list as a web part. Now, I want to connect the 2 web parts, but it's not available. Basically, what I wanted is that
when I select an item on the lookup column, the webpart containing 1st list would show that item on the same page.
I think I'll need to use Sharepoint Designer to implement something like this, but just wanted to check if anyone has done something like this using browser only.
Initially i have Newform.aspx in the list.In that when i am clicking an icon that is available in Rich Text Box Editor it is taking me to another aspx page.In that page i have custom web part with One Field Control to upload and one Button to upload the
files.Now my requirement is as soon as after uploading these file from web part i should display the file names in the Rich Text Box.Please share your ideas of capturing file names in the web part and getting those file names in the rich text box in the newform.aspx
of the list please let me know
Thanks & Regards,
I'm migrating an old ColdFusion site to ASP.NET. One of the pages has a form that posts to an external URL.
<form action='https://www.innlinkcrs.com/rescreate.asp' method='get'>
I just discovered that you can't do this in an .aspx page. Seems the page will just post to itself if you hit the submit button.
What's the proper technique for achieving this in ASP.NET? There are a couple of hidden fields that pass parameters to the external URL.