Creating ASP.NET/HTML pages 100% programmatically


Is it a possible create HTML pages 100% programmatically\tParticularly in VS2005, this would mean creating an empty .html file, putting it into a member pages folder, "figuring out" and adding HTML to the file, closing it, and associating it with a code behind file.

I'm not sure WHY I would do it, but I would like to know if it's possible to do all these step(and, if it's in fact a "standard practice" in some situations).
Posted On: Wednesday 2nd of January 2013 01:02:04 AM Total Views:  397
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




SMTP / Local Host { RESOLVED }

I am having trouble sending mail from my server. Can I use my own mail box for the relay on the server. The server is outside the ISP's network though.example: mail.optonline.net (optonline.net being my ISP).The function works perfectly on my desktop, once deployed to the server however, It takes a moment to complete. It then redirects to another page but no email.Any ideas
VIEWS ON THIS POST

105

Posted on:

Sunday 11th November 2012
View Replies!

ASP. NET Problem

the web page which i want to develop is only allow one visitor to view the page. it mean if there are one visitor viewing the page, then the ither visitors cant view it.is this possible do it in asp .net if can, how to do it
VIEWS ON THIS POST

102

Posted on:

Sunday 11th November 2012
View Replies!

ASP.NET with MS Access VS SQL 2000; advantages/disadvantages?

I'm going to start my first ASP.NET project. In the process of looking for a web host I noticed that one account for $29 monthly offered a MS Access database and the next package higher at $59 monthly offers a MS SQL 2000 database. I was wondering if one database is better than the other , If one is easier to use than the other, and what the limitations of Access are compared to SQL. I will be working on a project for a car dealership to display all their cars in stock along with the vehicle options etc. They probably only have around 300 vehicles in stock at a time but have many fields for each record that include price, options,etc.I'm not sure which database type would work the best, I'd like to pay for only what it would take to do the job properly. I'm also not sure if learning/working with SQL is any harder or easier than Access and since I have to learn how to use one or the other, I guess it doesn't matter to me which one it is as long as it can do what it will need to do to make the website work well. If anyone has a minute of spare time could you please let me know your opinion.Thank you for any information you can provide.:D
VIEWS ON THIS POST

118

Posted on:

Monday 12th November 2012
View Replies!

Post Back on New Session

My Page_Load() code sets up my page if Session.IsNewSession is true. When I click a button after the session has expired Page_Load detects Session.IsNewSession is true and runs the code, but my button's onclick code still runs and causes a null exception trying to access a session variable. How can I stop the onclick functions when the session expires Is there a better way to handle a session expiring
VIEWS ON THIS POST

90

Posted on:

Thursday 15th November 2012
View Replies!

AJAX Autocomplete Extender

Moved to ASP.NET forum. You will get a better response in this forum.
VIEWS ON THIS POST

167

Posted on:

Friday 16th November 2012
View Replies!

JavaScript & CustomValidator Control

On a page I have a Repeater control, in the Repeater control I have an ItemTemplate which is CheckBox. As the Repeater is being bound it generates a CheckBox for each name in the contact list. I am trying to determine if the user selected at least 1 contact, I get the alert but the page posts back anyways. My CustomValidator looks like: My Javascript function (CheckContacts) liiks like: function CheckContacts(source, args) { var ctrl = 'repContacts'; var cbName = 'cbSelect'; var objForm = document.form1; var errorCount = 0; var ctrlName = ctrl + '__ctl1_' + cbName; var chkBox = document.getElementById(ctrlName); if(chkBox == null) { alert ('There was an issue checking the *'+cbName+'* check box in the *'+ctrl+'* control'); return errorCount; } var isChecked = false; var i = 1; // Notice the 1, its important to get the start number correct ctrlName = ctrl + '__ctl' + i + '_'+ cbName; var curItem = document.getElementById(ctrlName); if(null == curItem) { alert ('It was null'); // something is wrong. Probably one of the 'Customize Values' } while (curItem != null) { //to check items inside the DataGrid/Repeater //using the != null check should keep it from getting locked up if (curItem.checked == true) { isChecked = true; } //increment i AND get the next control i += 1 ; ctrlName = ctrl + '__ctl' + i + '_'+ cbName; curItem = document.getElementById(ctrlName); } if (isChecked == false) { source.errormessage = 'Your need to select at least 1 contact in your list'; errorCount+=1; } if (errorCount > 0) { args.IsValid = false; } else { args.IsValid = true; } } Alone I get no alert if no contact is selected. If I add code to the code behind that adds an onclick Event to my button like so: btnWriteMessage.Attributes.Add("onclick", "return CheckContacts()"); I get my alert but the page still submits, which is what Im trying to stop. This is my first attempt (believe it or not) at using a CustomValidator control, so anyone got any ideas
VIEWS ON THIS POST

99

Posted on:

Friday 16th November 2012
View Replies!

Changing the browser URL

I am making a simple login system, then if the users details are correct, it will navigate to a different website (example: Google) This is my code so far using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; namespace WebApplication1 { public partial class _Default : System.Web.UI.Page { string password; protected void Page_Load(object sender, EventArgs e) { StreamReader passwordStream = new StreamReader(@"K:\Uni (Year 3)\EJ315020S - Windows Application Devlopment\Projects\AssignmentProgram\LoginSystem\password.txt"); while (passwordStream.Peek() >= 0) { password = passwordStream.ReadLine(); } } protected void Button1_Click(object sender, EventArgs e) { if (TextUsername.Text == "Jbloggs") { if (TextPassword.Text == password) { } } else { } } } } i have searched for it, but all i can find is things about "URL Routing"
VIEWS ON THIS POST

158

Posted on:

Friday 16th November 2012
View Replies!

Runtime Window Form creation

Hi Friends, In my application i want to create a window form at runtime and save this newly created form in my current root directory. so that i can access that form in future. So, if any one has any idea how to do this then please help me. Here is the code what i did : Form f = new Form(); f.Name = "Frm_Test"; f.Text = "Test Form"; f.Show(); I can able to create a form dynamically but i did not know how to save this created form.
VIEWS ON THIS POST

133

Posted on:

Friday 16th November 2012
View Replies!

Using Web Services for Flash AS3 with asp.net

i am doing a game project on chinese checkers. I am using Flash Cs3 professional to program my project. all in actionscript 3.0. For my database and website, i used asp.net and sql server. I used IIS 5.1 also. I found out that Actionscript 3.0 do not support web services. i want to pass my data from flash to asp.net to store into database. Do anyone have any solutions
VIEWS ON THIS POST

189

Posted on:

Friday 16th November 2012
View Replies!

pagination in asp.net using c#

how to pagination in asp.net using c# coding
VIEWS ON THIS POST

175

Posted on:

Friday 16th November 2012
View Replies!

Session problems

Problem still exists but found out some new Information. Running IE 7.0.5730.11 from any XP machine, the above session problem holds true. Running it from Vista IE 7.0.6001.18000 it works the way I need it to. I have tried several windows XP machines some with servicepack 3 and others with only service pack 2. It doesnt really matter what updates are on it, the application still ends the session. "Still waiting for the brave willing soul to venture forth and delve into this problem."
VIEWS ON THIS POST

176

Posted on:

Friday 23rd November 2012
View Replies!

Allow users to create files dynamicly

I'm looking to allow a specific role on the site to create pages (through the ui I create). By default asp.net doesnt grant this permission. How would I allow the role permissions to write files
VIEWS ON THIS POST

138

Posted on:

Friday 23rd November 2012
View Replies!

trying to choose multiple files for uploading

Hi to alli am trying to do a multiple file upload functionI use a input control : when i run the Web Aplication and click in the associated input button, it opens an "explorer" to choose the file that is going to be uploaded.but i can choose only one.Is there a way that enables me to choose more then one file\ti saw other solutions but they all implicate a fixed number of
VIEWS ON THIS POST

128

Posted on:

Sunday 25th November 2012
View Replies!

ASP.NET 2.0 Data Cache sort problem

I query a table that creates a dataset in "lastname" order. I then bind the table to a datagrid that displays the data in the proper "lastname" order. When I move to a "record layout" page I create a datatable from the Cached table and I want to navigate is "lastname" order. Instead, the navigation is in "emp_id" order.GRIDEMP_ID\tLASTNAME\t\tFIRSTNAME5\t\t\t\t\t\t\tA\t\t\t\t\t\t\t\tJOAN3\t\t\t\t\t\t\tB\t\t\t\t\t\t\t\tJOHN1\t\t\t\t\t\t\tC\t\t\t\t\t\t\t\tKEVIN\tAFTER RESTORING CACHE IN RECORD LAYOUT I GET THIS ORDEREMP_ID\tLASTNAME\t\tFIRSTNAME1\t\t\t\t\t\t\tC\t\t\t\t\t\t\t\tKEVIN3\t\t\t\t\t\t\tB\t\t\t\t\t\t\t\tJOHN5\t\t\t\t\t\t\tA\t\t\t\t\t\t\t\tJOAN\tPage 1 (contains grid)strSQL\t= "SELECT emp_id, lastname,firstname"strSQL += " FROM EMPLOYEES ORDER BY lastname"dstSearch\t= New DataSet()conPubs\t\t= New OleDbConnection(connection_string)dadSearch\t= New OleDbDataAdapter(strSQL, conPubs)dadSearch.Fill(dstSearch, "C_EMPLOYEES")dtblSearch = dstSearch.Tables("C_EMPLOYEES")dgrdEmployees.DataSource = dstSearchdgrdEmployees.DataBind()Cache("CACHED_TABLE") = dtblSearchStep 2. On the grid I have a "Select" link that shows a page\twith detail about the employee. On the forms are and buttons.\tWhen I press the next and prev buttons, the cached data moves in "emp_id" order rather than last name.Page 2 Record LayoutSub Record_View()Dim dtblTemp\t\tAS DataTableDim dvwRecord\t\tAS DataViewDim RowIndex\t\tAS IntegerDim numrows\t\t\tAS INTEGER\t\t\t\tSESSION("PREV")\t= 0SESSION("NEXT")\t= 0SESSION("FIRST") = 0SESSION("LAST")\t= 0dtblTemp\t\t= Cache("CACHED_TABLE")numrows\t\t\t= dtblTemp.Rows.Count-1SESSION("FIRST") = dtblTemp.Rows(0).Item("EMP_ID")SESSION("LAST")\t= dtblTemp.Rows(numrows).Item("EMP_ID"))dvwRecord\t\t\t= dtblTemp.DefaultView()dvwRecord.Sort = Session("LASTNAME") RowIndex\t\t\t= dvwRecord.Find("EMP_ID"))\t\t\t\tIF RowIndex -1 THEN\t\tIF RowIndex > 0 THEN\t\t\tSESSION("PREV") = dvwRecord(RowIndex-1).Row(EMP_ID"))\t\tEND IF\t\tIF RowIndex dtblTemp.Rows.Count-1 THEN\t\t\tSESSION("NEXT") = dvwRecord(RowIndex+1).Row("EMP_ID"))\t\tEND IFEND SUB
VIEWS ON THIS POST

272

Posted on:

Tuesday 27th November 2012
View Replies!

Tooltip for a database driven listbox

Is there a way to make a tooltip for a database driven listbox without using client side codeWhen not does anybody know a way to develop thisThx
VIEWS ON THIS POST

143

Posted on:

Tuesday 27th November 2012
View Replies!

write a program to ping a series of IP addresses

Steve, you can use the xp_Cmdshell extended Stored procedure if you are using SQL Server.CODExp_cmdshell 'PING 127.0.0.1'Try that in Query Analyzer with some different IP addresses and you should get back several rows depending on the results.\tFrom those results you should be able to get all the info you need.You could probably write your own sproc to do this and ping a list of preconfigured ips.
VIEWS ON THIS POST

174

Posted on:

Tuesday 27th November 2012
View Replies!

Can web form perform drag and drop?

Can web form perform drag and drop
VIEWS ON THIS POST

146

Posted on:

Tuesday 27th November 2012
View Replies!

make label text invisible after 3 minute?

I use label as message bar. Is it possible to make label text invisible after 3 minute
VIEWS ON THIS POST

152

Posted on:

Tuesday 27th November 2012
View Replies!

Javascript functions stop working

Hi ,I need desperate help!!! I have an ASP.NET application that depends heavily on scripting. I was getting ready to put the website online (in a couple of days) when suddenly all the javascript that I have on the site stopped working. I'm running Windows 2000 Server, and the last thing I did was I went to Windows Update and downloaded over 25 updates for my machine, 18 of them critical. Other than that, I have done absolutely nothing so I'm suspecting that one of the updates messed me up. Does anybody know what may be happening
VIEWS ON THIS POST

164

Posted on:

Tuesday 27th November 2012
View Replies!

Problem with RichTextBox component

hello,I have a web application in which I want to use the functionalities of the RichTextBox component.I added it to my reference and import the system.windows.form.I use it like thismyRichTextBox as new RichTextBox()myRichTextBox.Rtf = "my RTF string"but I have the followinfg errorSystem.ComponentModel.Win32Exception: The class already existI don't know what's going on.Any Ideas\t
VIEWS ON THIS POST

123

Posted on:

Tuesday 27th November 2012
View Replies!

class for server variables

I'm looking to use request in some vb.net modules in my asp app. Which class is needed in order get access to the server variablesTIA
VIEWS ON THIS POST

137

Posted on:

Tuesday 27th November 2012
View Replies!

Newbie Questions

I've never used .net but I've got .net source code that i want to use. I'm currently running IIS 5.0. Is is as simple as using those files or do I need to install a program that will allow me to use .net programming
VIEWS ON THIS POST

134

Posted on:

Wednesday 28th November 2012
View Replies!

Unable to print report from the server

I have an app built in asp 2.0. It allows data entery and when the data is saved to a database, it prints a crystal report. This all works fine when I run it local on my machine. But when I publish it to the server, it bombs. Here is my code and the error message.CODE'**************** this is the code that actually prints the report\t\t\t\tDim myReportDocument As New ReportDocument\t\t\t\tmyReportDocument.Load(Server.MapPath(strReport))\t\t\t\tmyReportDocument.RecordSelectionFormula = "{command.RECORDID} = " & Session("ReportID")\t\t\t\tmyReportDocument.PrintToPrinter(1, True, 1, 99)Error Message:Error in File C:\WINDOWS\TEMP\CaseLogDoc {39507207-A58B-48F3-ABEA-8FE633E626D3}.rpt:Unable to connect: incorrect log on parameters. ProDev, MS Access ApplicationsVisit me at ==> http://www.prodev.usMay God bless you beyond your imagination!!!
VIEWS ON THIS POST

133

Posted on:

Tuesday 1st January 2013
View Replies!

Best Practice for DetailsView

Using .NET 2.0 and VS2005 I'm creating a new website and I'm trying to utilise the new controls and features were possible.At the moment I'm making a simple update / add record form and initially tried creating the textboxes and using a ObjectDataSource Control set to a TableAdapter to add the fields. This worked but I can't for the life of me work out how to read a record from the ObjectDataSource and populate the textboxes ready for an edit to occur. I'd still be interested in hearing how to do thisAnyway, so I decided to try the detailsview control. At first I couldn't work out how to validate it and add multiline textboxes, but some time playing with templates has got most of that ironed out. However I'm trying to work out the best practice for updating some default fields in the table that the user should not see in the details view. I have a field for modified date to enable basic auditing of the updates and want to update it with the current date and time when the user clicks the update command in the detailsview. How can I do this / what method is best advice greatly appreciated.Cheers, Steve G (MCP)
VIEWS ON THIS POST

137

Posted on:

Tuesday 1st January 2013
View Replies!

Crystal Report to PDF Problem in ASP.Net

Hi ,I have a problem.\tI need to generate a PDF from a crystal report on a web form.\tThats no problem, that works, but for some reason, my page behind the PDF disapears.\tWhat i mean is the page that made the request (even though it has the same URL) is blank and the PDF opens up in acrobat over the web page.my code CODE\t\tPrivate Sub cmdGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGenerate.Click\t\t\t\tExportReport()\t\tEnd Sub\t\t\t\tSub ExportReport()\t\t\t\tDim oStream As New MemoryStream ' // using System.IO\t\t\t\t' Select Case format\t\t\t\t'\t\t\tCase "PDF"\t\t\t\toStream = cr.ExportToStream( _\t\t\t\t\t\t\t\t\t\tCrystalDecisions.Shared.ExportFormatType.PortableDocFormat)\t\t\t\tResponse.Clear()\t\t\t\tResponse.Buffer = True\t\t\t\tResponse.ContentType = "application/pdf"\t\t\t\t'--------------------------------------------------------------\t\t\t\tTry\t\t\t\t\t\tResponse.BinaryWrite(oStream.ToArray())\t\t\t\t\t\tResponse.End()\t\t\t\tCatch err As Exception\t\t\t\t\t\tResponse.Write("< BR >")\t\t\t\t\t\tResponse.Write(err.Message.ToString)\t\t\t\tEnd Try\t\tEnd Su
VIEWS ON THIS POST

126

Posted on:

Tuesday 1st January 2013
View Replies!

ListBox Javascript

Does anyone have Javascript for limiting the number of selected items (lets say to 5) in a multi-select ListBox using ASP.NET
VIEWS ON THIS POST

107

Posted on:

Tuesday 1st January 2013
View Replies!

Lost SQLDataAdapter on page design

Hi ALL,For some reason, I've lost my SQLDataAdapter, SQLConnection, and Dataset icons that appear at the bottom of the design page.\tOf course, I need these to make property changes.\tAnyway, I closed VS and reopened it, but it didn't make any difference.\tThe version I am using is:\tMicrosoft Visual Basic .NET\t69461-270-0000007-18910Has anyone seen this before\tAny thoughts, ideasTIA, Randy
VIEWS ON THIS POST

383

Posted on:

Tuesday 1st January 2013
View Replies!

Sending a Row of Data Through a Web Service

,I am creating a web service and I want it to retrieve and return a row of data.\tI know I can use a dataset to do this but its overly bulky to do so.\tFor example, it takes a quite awhile for a pocket pc to interpret the dataset from the web service.\tIm looking for something lighterIs there any less bulky way to send a data table or a data column
VIEWS ON THIS POST

147

Posted on:

Tuesday 1st January 2013
View Replies!

Creating Dataset via Data Adapater OR DataTable Programmatically

Your help is appreicated, I am reading .Net and got confused. Data Adapter (DA)can create DataSet with one or more Datatable\t(DT)by using the DA method ( Fill). However, DS and DT can also be created programmatically.I find it easier to use DA.Fill. So my question, why would a developer\tcreate Ds and DT programmatically and what added advantages would he/she gains
VIEWS ON THIS POST

120

Posted on:

Tuesday 1st January 2013
View Replies!

length of a textbox

fairly new to web programming.i have a webpage containing an asp:textbox (textbox1) and an asp:label(label1).As the user is typing into the textbox i want the label to show the amount of characters they have typed.i think this should probably be done on the client side.How do i go about doing this\t
VIEWS ON THIS POST

123

Posted on:

Tuesday 1st January 2013
View Replies!

layout problems

hi. sorry for the gui problem but i am having a suprisingly difficult time getting the various components on the top of my form to behave appropriately. i am trying to acheive the effect of www.linkedin.com with a panel on top and tabstrip just below. when i try to move the tabstrip up just a little, it want so move a huge leap to beneath the panel. messing with margins, etc doesn't work. i have tried this in both flowlayout and gridlayout and neither offer a way (that i have discovered) to have components nicely line up without overlap. i'd appreciate feedback at this point.
VIEWS ON THIS POST

354

Posted on:

Tuesday 1st January 2013
View Replies!

FolderBrowserDialog

I am trying to use the FolderBrowserDialog option to allow users to browse for a folder. I can't seem to get it to import System.Windows.Forms which I assume I need - it says: Namespace or type...cannot be found.I am using VB.NET and .NET v1.
VIEWS ON THIS POST

134

Posted on:

Tuesday 1st January 2013
View Replies!

Why do my edit fields in a datagrid have special formatting?

Any help will be greatly appreciated! Heres the problem: in edit mode the first 3 fields firstName, middleName and lastName have special formatting. Those 3 fields are a different color and have a 3-D shadow effect. The other two socialSecurityNumber and amount appear as a normal textbox. The real problem is I dont know where in the following code the special effects comes from or is it in my code behind. Can anyone point me in the right directionThank you!iReadList Contacts\t\t\tAdd New Contact\t|\t\tMain Menu\t First Name Middle Name Last Name Social Security Amount
VIEWS ON THIS POST

119

Posted on:

Tuesday 1st January 2013
View Replies!

Make a page postback?

Is their a way to make an aspx page poat backSituation..Child window "CompleteAccount.aspx" that sets a session. Need to check that session when the Close button is clicked.on Parent "Account.aspx" in vb code behind in a sub()Dim s as strings = "window.open('CompleteAccount.aspx' ,'alert','width=400,height=200 resizable=yes scrollbars=no');"Response.Write(s)After the user completes the work on the child page how can I make the parent page postback
VIEWS ON THIS POST

183

Posted on:

Tuesday 1st January 2013
View Replies!

Help with a nested Datalist

I am trying to create Nested Datalist and it doesn't like my relation statement. Any help would be great. Visual Studio tells me that "Override Resolution failed because no accessible add can be called with these arguments. selectCMD1 = New SqlCommand()\t\t\t\t\t\tselectCMD1.CommandText = "Select * from medicalreimb where loginID = '" & employee.SelectedItem.Value & "' and theyear = '2003'"\t\t\t\t\t\tselectCMD1.Connection = dbconn\t\t\t\t\t\tselectCMD1.CommandTimeout = 30\t\t\t\t\t\tdbconn.Open()\t\t\t\t\t\tDim empDA As SqlDataAdapter = New SqlDataAdapter()\t\t\t\t\t\tempDA.SelectCommand = selectCMD1\t\t\t\t\t\tDim empDS As DataSet = New DataSet()\t\t\t\t\t\tempDA.Fill(empDS, "medicalreimb")\t\t\t\t\t\tdbconn.Close()\t\t\t\t\t\tempDS.Relations.Add("myrelation", empDS.Tables("medicalreimb").Columns("loginID"))\t\t\t\t\t\tmedicaldata.DataSource = empDS.Tables("medicalreimb")\t\t\t\t\t\tmedicaldata.DataBind()
VIEWS ON THIS POST

145

Posted on:

Tuesday 1st January 2013
View Replies!

Problem configuring a ODBC datasource

Hi. I'm using VS2008. My problem is that I need to configure my ODBC data source with a custom stored procedure, but when I get to the "define custom statements or stored procedures" page in the configure wizard, stored procedures bullet is greyed out.\tI need to use this data source to populate a gridview
VIEWS ON THIS POST

126

Posted on:

Tuesday 1st January 2013
View Replies!

IErrorInfo.GetDesrciption with union query

I am converting an access application to .net. We are keeping the date in access - oh joy...Any way, I have a query that I am using to populate a gridview. Since gridviews will not display a blank row if there are no records I added a union to my query in access to select a blank row from the database. This worked when we did it in SQL but in access every time I add the union into my select I receive IErrorInfo.GetDescription failed with e_fail. PARAMETERS intEmployeeKey Short, TaskDate DateTime;SELECT TaskTime.Pkey, TaskTime.TaskDate, TaskTime.Hours, TaskTime.Notes, Task.TaskNameFROM Employee INNER JOIN (Task INNER JOIN ([Position] INNER JOIN (EmployeePosition INNER JOIN TaskTime ON EmployeePosition.Pkey=TaskTime.EmployeePositionKey) ON Position.Pkey=EmployeePosition.PositionKey) ON Task.Pkey=TaskTime.TaskKey) ON Employee.Pkey=EmployeePosition.EmployeeWHERE (((Employee.Pkey)=[intEmployeeKey]) AND ((TaskTime.TaskDate)=[TaskDate]))UNION SELECT '', '', '', '', ''FROM Employee INNER JOIN (Task INNER JOIN ([Position] INNER JOIN (EmployeePosition INNER JOIN TaskTime ON EmployeePosition.Pkey=TaskTime.EmployeePositionKey) ON Position.Pkey=EmployeePosition.PositionKey) ON Task.Pkey=TaskTime.TaskKey) ON Employee.Pkey=EmployeePosition.EmployeeWHERE (((Employee.Pkey)=[intEmployeeKey]) AND ((TaskTime.TaskDate)=[TaskDate]));Can I not do this in access
VIEWS ON THIS POST

71

Posted on:

Tuesday 1st January 2013
View Replies!

.NET component within web application

I have created a COM+ component that can be accessed either through ASP or ASP.NET applications.I have created this as a .NET class library.I have noticed that the component fails intermittently in the ASP applications but not in the ASP.NET applications. I'm not seeing anything on the event logs on the web server.\tIt will fail on the ASP applications at Server.CreateObject(). I suspect some sort of permissions issue is causing the problem.This question spans different architectures, but checking to see if anyone has run across this problem.Anyone have any clues on this
VIEWS ON THIS POST

80

Posted on:

Tuesday 1st January 2013
View Replies!

saving records with ASP.Net

, i need some help because i'm new at this and i'd like to save a record with Asp.Net and visual web developer from a form. I really thank any support that you can bring me. , I've noticed that the table involved here, was empty, but shouldn't the system check this\t
VIEWS ON THIS POST

130

Posted on:

Tuesday 1st January 2013
View Replies!

UserControl caching

I am hosting a usercontrol on a masterpage that builds a dynamic menu based on the user name I retrieve based on the user's windows logon.\tI have a table in the database that retrieves role information based on their logon id.I want to display this usercontrol based on the user's logon, which I have captured in a session object.\tDifferent users will have different menu items based on their role in the database.I am not using the menu control shipped with ASP.NET.\tI'm using an Oracle database, which doesn't lend itself well to building a membership provider.How should I approach building a fragment cached user control in this scenario that display a different cached user control based on the user's logon
VIEWS ON THIS POST

116

Posted on:

Wednesday 2nd January 2013
View Replies!

Retrieve height of datalist when height not initially set?

I'm trying to dynamically adjust the height of a container div based on the height of a datalist it contains. However, I don't have a default height set for the datalist, the height just flexes based on how many rows are returned. I thought I could just do an body onload statement like this:onload="document.getElementById('detail_div').style.height = document.getElementById('DataList1').height;"but this doesn't return anything. If I explicitly set the\theight of the DataList, then it works fine. How can I find out the height of my DataList if I don't set it when its created
VIEWS ON THIS POST

166

Posted on:

Wednesday 2nd January 2013
View Replies!

OLEDB DataAdapter configuration failing - table with multiple columns

Hi allIs there a maximum number of columns for an OLEDB dataadapter to handle I'm trying to configure a dataadapter to generate select, insert, delete and update commands for an Access table with over 100 columns. I'm going to customise the SQL later because I won't use all 100 columns at the same time, but I just need the Wizard to configure it to start with.However the configuration wizard fails and doesn't tell me the reason. It generates the select statement only.I've tried generating it with fewer fields and it works, so my only conclusion is that the table design is too big for the wizard to handle.Can anyone confirm or otherwise If this is true, any suggestions, other than reducing the table size.Julia
VIEWS ON THIS POST

143

Posted on:

Wednesday 2nd January 2013
View Replies!

Text field won't display correctly

, I have a text field which hold a whole body of an Article. When I display this field using DataList, it becomes 1 paragraph. Seems like the 'enter' key disappear.In classic ASP, I have this function to resolve that. How would I do the same thing in ASP.NET
VIEWS ON THIS POST

130

Posted on:

Wednesday 2nd January 2013
View Replies!

Deployment Strategies

I am currently developing on a workstation.\tMy ASP.Net app resides on a separate server.\tI can copy over my application and have it work easy enough.\tHowever I'm concerned about overwriting data in the ASPNETDB.MDF.\tI have live data on the production server, but I'm constantly updating and adding to the DB.What is a good strategy to keep the production and development database in synch without overwriting the live data on the production server
VIEWS ON THIS POST

101

Posted on:

Wednesday 2nd January 2013
View Replies!

Adding controls at runtime

\tA better way to handle this would be to create individual objects and add the textboex etc, to the table cell, then add the tablerow then add the table to the page. , you need to set up another variable to keep track of how many controls you have because with each postback you must recreate all programmatically created controls.ie\tyou hit add 1 time, checking control variable count, its at 0 right now, so set variable to 2, loop through control creation code.hit add button again.\tretrieve control creation variable.\tvalue is currently 2, add 2 more to it, then do your loop to create.\tetcetc. , here is part of my code in a submit onclick event where i get my textbox values.\tyou must create textbox controls to get their values - you canty refernce them by name.sorry this is in C# but you'll get the ideaCODE\t\tprotected void cmdSumbit_Click(object sender, ImageClickEventArgs e)\t\t{\t\t\t\t// get dynamic textbox for phonenumbers values\t\t\t\tint n = Int32.Parse(Session["NumberOfPhones"].ToString());\t\t\t\tstring[] strPhoneValues = new string[n];\t\t\t\tstring[] strPhoneIDValues = new string[n];\t\t\t\t\t\t\t\tfor (int x = 0; x < n; x++)\t\t\t\t{\t\t\t\t\t\tstring boxName = "txtPhoneNumber" + (x + 1);\t\t\t\t\t\tstring idboxName = "txtPhoneID" + (x + 1);\t\t\t\t\t\tstrPhoneValues[x] = ((TextBox)FindControl(boxName)).Text;\t\t\t\t\t\tstrPhoneIDValues[x] = ((TextBox)FindControl(idboxName)).Text;\t\t\t\t}\t\t\t\t// get dynamic textbox values\t\t\t\tDataSet ds = DatabaseFunctions.GetOrgItems(Convert.ToInt32(Session["SiteID"]), "OrganizationData");\t\t\t\tint i = Int32.Parse(ds.Tables[0].Rows.Count.ToString());\t\t\t\tstring[] strFieldName = new string[i];\t\t\t\tstring[] strFieldNameValues = new string[i];\t\t\t\tint y = 0;\t\t\t\tforeach(DataRow dr in ds.Tables[0].Rows)\t\t\t\t{\t\t\t\t\t\tstring strfieldName = dr["fieldname"].ToString();\t\t\t\t\t\tstring strfieldNameValues = "txt" + dr["fieldname"].ToString();\t\t\t\t\t\tstrFieldName[y] = strfieldName;\t\t\t\t\t\tstrFieldNameValues[y] = ((TextBox)FindControl(strfieldNameValues)).Text;\t\t\t\t\t\ty++;\t\t\t\t}........ , on which line do you get the error , Of course the problem is that controls created at runtime have to be recreated each postback and won't maintain viewstate unless they're recreated in Page_Init\tSo here's the solutionCODEPrivate Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init\t\tInitializeComponent()\t\tDim myTextbox As TextBox\t\tDim myRow As TableRow\t\tDim myCell As TableCell\t\tIf Not IsPostBack Then Session("TextBoxCount") = -1\t\tFor counter As Integer = 0 To Session("TextBoxCount")\t\t\t\tcreateTextBox(counter)\t\tNextEnd SubPrivate Sub myButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myButton.Click\t\tSession("TextBoxCount") += 1\t\tcreateTextBox(Session("TextBoxCount"))End SubPrivate Function createTextBox(ByVal iIndex)\t\tDim myTextbox As TextBox\t\tDim myRow As TableRow\t\tDim myCell As TableCell\t\tmyTextbox = New TextBox\t\tmyTextbox.ID = "txtMine" & iIndex\t\tmyCell = New TableCell\t\tmyCell.Controls.Add(myTextbox)\t\tmyRow = New TableRow\t\tmyRow.Cells.Add(myCell)\t\tmyTable.Rows.Add(myRow)End FunctionNow your textboxes are created before viewstate is applied to the controls so you can let Microsoft handle it.\tLet me know if this works out for you.
VIEWS ON THIS POST

388

Posted on:

Wednesday 2nd January 2013
View Replies!

CSS Control Adapters

Has any one ever used CSS Control Adapters How do you install it in to VS 2005.netBabloome
VIEWS ON THIS POST

165

Posted on:

Wednesday 2nd January 2013
View Replies!

how define demension dynamically

I have on a Default.aspx this tag:...................Now i will to make the height of the image dynamically:PS:myParameter is a Parameter, which i retrieve it from database 1-How do thisWhere should be myParameter defined, in Default.aspx or in codebehind....2-Is There maybe better technique in\tto define the Hight instead of to write\tstyle="height:250px ,i mean some other controll, Grid or whatever i dont know them!PS:i use C# as to write my Classes, codebehind a.s.
VIEWS ON THIS POST

164

Posted on:

Wednesday 2nd January 2013
View Replies!

regular expression for credit card expiration date

I've found some sample regexs for dates,\tbut they dont work in my validator.\tDoes an yone have one they could share that will work with my asp.net reg expression validator
VIEWS ON THIS POST

99

Posted on:

Wednesday 2nd January 2013
View Replies!

Hide Node on Tree View

I have a tree view on my page that uses a SiteMap xml datasource.Is there a way, in the databound event, to hide a node based on some condition. The tree uses the Arrows image set and I want to hide the Tree text and the Arrow
VIEWS ON THIS POST

167

Posted on:

Wednesday 2nd January 2013
View Replies!