SEARCH YOUR SOLUTION HERE  

Display multiple records per row in a datagrid

Is it possible to display multiple records per row in a datagrid

I want to display 3 records per row and want to use a datagrid in order to take advantage of the built-in paging.

Posted On: Tuesday 1st of January 2013 09:59:47 PM Total Views:  179
View Complete with Replies




Related Messages:

Creating divs in Razor function   (240 Views)
, I'm trying to 'functionalize' the process of creating a bunch of divs to clean up my code. Here's what I'm trying to do: My program reads in an excel file and splits the lines into lists using ',' as the delimiter. I have a bunch of pages that need to display the same type of information, so I'm trying to write a function instead of having to rewrite the for loop 15-20 times: @functions { void returnDrivers(List list, List colors){ for(int i = 1; i < list.Count; i++){ if(list[i] != ""){ @:@list[i] } } } } First error I received was a missing ; QuoteCompiler Error Message: CS1002: ; expected Source Error: Line 126: if(list[i] != ""){ Line 127: @:@list[i] Line 128: } Line 129: } Line 130: }
Nesting SQL Queries in Frontpage   (168 Views)
Please help - I have been searching the web for hours and have come up woith nothing I am working in FrontPage 2003 and creating ASP pages which calls from and writes to an Access database. I need to create a nested sql query and can't work it out at all. FrontPage's Database Results Wizrd is greyed out if I try to create a second database result inside another one. Essentially I want to present a list in 2 levels - for each item in the main list I want to display one (or more or less) sub items which are uniquely assciated with that main list item. I would have thought this would be simple enough and there must have been many people who have done this already Many
Images to file etentions   (249 Views)
Hi . I m new to all this so if anyone could help with a solution or point me in the right direction that would be great. I m creating a site that uses ASP and MySQL. I m trying to create an upload page so when the end-user uploads a file or an app it returns them to another page that has the record entered and sorted e.g. the new page which will display all the previous records uploaded and in the format of : pdf.gif, filename invoice.pdf , description, date uploaded and finally a link to the file for it to be downloaded download.gif. I know this is a multi part process but any assistance especially with the code of returning an image associated to the file would be great.
forum for my website   (188 Views)
need help to make forum to my website. my website written in asp.net with c# and i do not know how to do that.
Change color of the background via class css   (166 Views)
Well...I am just wondering if there is a way to change the color of the background or change the class of the CSS. These are the code //THIS IS MY MASTER PAGE OF THE ASP WEB PROJECT //This is the body //This is the form //Web user control //Content Page holder of the master page //MASTER PAGE CODE-BEHIND-FILE protected void Page_Load(object sender, EventArgs e) { } public HtmlGenericControl BORDER { get { return VideoBorder; } set { VideoBorder = value; } } public HtmlGenericControl PAGEBODY { get { return PageBody; } set { PageBody = value; } } //THIS IS THE CODE-BEHIND-FILE LOG IN PAGE Master.PAGEBODY.Attributes["class"] = "backgroundBlue"; //override or set the current class to the class named backgroundBlue However, the background color only effects the login page...As soon as the user login the background color of other pages remain the same default color, and never change to blue color background. Since I modify the CSS used for the master page, it should take effects on all other pages that inherit the Master page. But just wonder how come it won't work , Ok...Here is the how it works. It does the postback, but the color does not change until I click on another page. So the question is if it is possible to do something like this: Once the user select the color from the droplistbox, the background color of the page changes right away
Allow to insert apostrophe in sql server database in asp.net   (216 Views)
I 've made website in asp.net with sql server database , when the user fill text in the textbox, sql server doesn't allow text which contains apostrophe to insert in the table, How can I make my page allow to user to insert text which contains apostrophe
VB.NET INTERESTING PROBLEM- MOVING AVERAGE.. NEED HELP!   (155 Views)
Hi I have an interesting problem in vb.net. And I am struggling to get a solution for this trying for the past 3days.. Its to calculate moving average for the inputs given by the user.. The following are the steps to make it clear.. 1, get 2user inputs in textbox(1st input is number is periods, 2nd is moving range) 2, after getting both the user inputs, the user will click on an input button which must dynamically generate rows for the number of periods given by the user as well as a calculate button must appear dynamically. 3, the user again inputs the values the all the dynamically generated rows and when he presses calculate button, the moving average for the given moving range must appear in another column I have done with half way and I have attached my progress here.. I would greatly appreciate if u complete it for me.. thanks in advance Partial Public Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim TxtDyn1 As TextBox() Dim TxtDyn2 As TextBox() Dim TxtDyn3 As TextBox() Dim TxtDyn4 As TextBox() Dim numofper As Integer Try 'to check the textbox for empty If Not TextBox1.Text Is String.Empty Then numofper = TextBox1.Text ReDim TxtDyn1(numofper) ReDim TxtDyn2(numofper) ReDim TxtDyn3(numofper) ReDim TxtDyn4(numofper) Else Exit Sub End If 'To create the dynamic text box and add the controls to panel For i As Integer = 0 To numofper - 1 TxtDyn1(i) = New TextBox Panel1.Controls.Add(TxtDyn1(i)) Next For j As Integer = 0 To numofper - 1 TxtDyn2(j) = New TextBox Panel2.Controls.Add(TxtDyn2(j)) Next For k As Integer = 0 To numofper - 1 TxtDyn3(k) = New TextBox Panel3.Controls.Add(TxtDyn3(k)) Next For l As Integer = 0 To numofper - 1 TxtDyn4(l) = New TextBox Panel4.Controls.Add(TxtDyn4(l)) Next Dim mybutton As New Button mybutton.Text = "button 2" AddHandler mybutton.Click, AddressOf PrintMessage Me.Controls.Add(mybutton) Catch ex As Exception MsgBox("Enter a valid Number") End Try End Sub Private Sub PrintMessage(ByVal sender As System.Object, ByVal e As System.EventArgs) MsgBox("Dynamic event happened!") End Sub End Class Mod edit - Fixed code tags.
Converting a vb6 form to ASP   (225 Views)
Is there a way to convert an existing appplication witch using forms to ASP with Visual Basic 2005 or do i have to look for a special converter
refreshing a page using a button   (162 Views)
i dont even know if it is possible but was wondering if any one knows what kinda of code is needed to refresh a page using a button
Mailbox unavailable when sending to an external address   (210 Views)
I have to email sender class. 1 for the sending to external addresses using namespace System.Web.Mail and another for sending to internal address using namespace System.Net.Mail.I would like to only use System.Net.Mail for both internal and external emials. The problem I ran into is "Mailbox Unavailable" when sending to external email addresses.public EmailSender(string From, string To, string Bcc, string Subject, string Body) { this.m_strFrom = From; this.m_strTo = To; this.m_strBcc = Bcc; this.m_strSubject = Subject; this.m_strBody = Body; this.m_strAttachment = Attachment; /// instantiate MailMessage class /// MailMessage mail = new MailMessage(); /// set addresses /// mail.From = new MailAddress(m_strFrom); mail.To.Add(m_strTo); mail.Bcc.Add(m_strBcc); /// set mail content /// mail.Subject = m_strSubject; mail.Body = m_strBody; /// set mail body type to HTML /// AlternateView htmlmail = AlternateView.CreateAlternateViewFromString(m_strBody, null, "text/html"); mail.AlternateViews.Add(htmlmail); /// send mail to defined smtp server /// SmtpClient smtp = new SmtpClient("heops-s01.heops.local"); smtp.Send(mail); }
Populate table and maintaining data across postback problem   (197 Views)
Hi i have the following code within a user control to build a table:protected int RowCounter{ get { object o = this.ViewState["RowCounter"]; return o != null (int)o : 0; } set { this.ViewState["RowCounter"] = value; }}protected void Page_Load(object sender, EventArgs e){ if (this.IsPostBack) this.RebuildTable();}protected void RebuildTable(){ for (int i = 0; i < this.RowCounter; i++) { this.AddRow(); }}protected void AddRow(){ // Create the cell TableCell cell = new TableCell(); // Add the textbox and spacer to the cell cell.Controls.Add(new TextBox()); // Create the row and add the cell TableRow row = new TableRow(); row.Cells.Add(cell); // Finally add the row to the table tblScreenNames.Rows.Add(row);}protected void btnAddRow_Click(Object sender, EventArgs e){ this.AddRow(); this.RowCounter++;}When clicking the add row button a new row is added and the remaining values are still populated from the view state. I now wish to pass a collection to populate the table when the page first loads. I added my property but the Page_Load is called before the property is set so I tried using the Page_PreRender method (and rebuild/populate the table when my property is set) but now when you click the button to add a new row the previous entered information is lost (i assume since the pre render happens after the viewstate is populated). I have gone over and over this in my head and it seems that i need to build the table in the Page_Load (to maintain the data across postbacks) but i cannot get the number of rows to add since this is not discovered until after my property is set but this does not happen until after the Page_Load.It seems i'm going around in circles. I'd really appreciate if someone could help.
Type 'Int32' Not Defined Compile Error   (150 Views)
.I have moved an asp.net 2.0 using visual basic web application from my development machine to another dev pc. When I attempt to compile the project I receive copious "Type 'Int32' not defined" error messages. None of the error messages are for any sort of special library but rather these basic types. of my references are the same when looking at the machines next to each other. The imports statements are there as well.Any suggestions or ideas on this oneTHanksjim
send email from column gridview   (244 Views)
Hi ..Sorry, I don't write english very well!!!I have my gridview from Database Informix. I want so a column of gridview I can to send email (it depending if it found any value in the database).I'm trying of use mailto: but not fuctionally!!How ca i do it
Spacer in Menu Item Control ?   (243 Views)
I want to create a horizontal spacer in a dropdown menu list. How do I accomplish thi
Getting the value of a radio button list   (163 Views)
HiI'm calling a javascript function from an asp.net page and need to test a value. I'm running this bit of code..CODEalert(document.getElementById("rblUKResident").Value);..so that I can test the value of a .net radio button control. The control has the values "Yes" and "No", but whichever one I select the alert always says 'undefined'. If I do the same test with a text box e.g.CODEalert(document.getElementById("txtName").Value);..it works fine and returns the value. Can anyone tell me why and therefore how I can access the value of a .net radio button list in javascript
Login failed for user '(null)'.   (179 Views)
I'm trying to connect a ASP.NET app to SQL. However when I try to connect I get the following message:Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.I've tried conecting using the following connection strings:string strConnSQL = "Server = " + m_strSQLServer + ";" + "Database = " + m_strDataSource + ";" + "Integrated Security=SSPI"; string strConnSQL = "Server = " + m_strSQLServer + ";" + "Database = " + m_strDataSource + ";" + "Trusted_Connection=Yes";I have also checked the box for Integrated Windows Authentication and unchecked Anonymous Access (IIS).Could someone help me figure out what I'm missingThank you in advance!- AT
Custom Clasee problem   (162 Views)
I have the following classCODEPublic Class FSOFunctions Dim objContext As HttpContext Public Function makeFolder(ByVal FolderName As String, ByVal FolderPath As String) As Boolean Dim oFolder As IO.DirectoryInfo oFolder = New System.IO.DirectoryInfo(objContext.Server.MapPath(FolderPath & FolderName)) If Not oFolder.Exists Then oFolder.Create() Return True Else objContext.Response.Write(objContext.Server.MapPath(FolderPath) & FolderName & " already exist") Return False End If oFolder = Nothing End Functionend classI then want to use it so i do this in the default.aspx.vb fileCODE Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim otest As New FSOFunctions If otest.makeFolder(FolderName.Text, "") Then Response.Write("Created") Else Response.Write("Exists") End If FolderName.Text = "" End Subi keep getting the following errorCODESystem.NullReferenceException: Object reference not set to an instance of an object.What am I doing wrong!!! }...the bane of my life!http://www.fuzzyd.co.uk
RequestedFieldValidation problem   (161 Views)
together!I have the problem that I have a aspx page and I want to validate it, but only if one button is pressed. if another button is pressed it shouldn't be pressed. So started enabling and disabling the validations.This works pretty fine until I one time get an validation exception, because then the code to disable it is not executed anymore.I already searched a lot but I couldn't find a solution
adding a folder to a project   (173 Views)
In the past I put everything for a project into one folder. Now I want to create folders inside my project. In solution explorer, I right-clicked the project icon and choose add/new folder. It added a folder, but I could not open it afterwards.Please advise.
Remove the last comma at the end of the string   (138 Views)
I have a loop that writes out a comma separated value list in a label control, and I want to remove the last comma of the list and write a stop '.', but to start with I can' t remove that comma. I tried:CODE Dim c_gest As SqlDataReader = CmdOffer.ExecuteReader() While c_gest.Read() cert_gest.Text() &= c_gest("Certificate_name") & ", " End While c_gest.Close cert_gest.Text().TrimEnd(", ") But it doesn' t work, nothing happens and the last comma continue there. How can I do i
CheckBox not firing event?   (311 Views)
For some reason my checkbox event is not firingCan someone hel
Fastest XML Lookup?   (148 Views)
I'm kinda new at this. I have an xml document that is generated from an Oracle db with thousands of records. I'll be using this xml to populate drop-downs quite frequently.What is the fastest way to repeatedly lookup values in a huge xml file XPathDocument XMLDataDocument XMLDocument Something else Would it be better to leave the xml document loaded in memory Is that even possible with a web applicationAny code examples or links would be helpful
Printing ASP.Net Code?   (167 Views)
Hi GuysWhen i print a ASP.net file, it prints in a dodgy wayfor example it replace "SYSTEM" with "S/stem" same goes with other words
Sending an e-mail message from a form   (323 Views)
Hi!I am trying to send an e-mail to the user after he/she has entered his/her e-mail address in a form field and has pressed the submit button, but it doesn t work, a long exception is returned. Somebody knows what is the problemThis is the code:CODESub obtain_Password(Sender As Object, E As ImageClickEventArgs) Dim E_mail As New MailMessage() E_mail.To = mail.Text() E_mail.From = "theMarket@theMarket.com" E_mail.Subject = "We send your password" E_mail.Body = "Your password is: " & password.Text() E_mail.Priority = MailPriority.High try SmtpMail.SmtpServer = "newS" SmtpMail.Send(E_mail) Message_ok.Text() = "We have sent your password successfully. catch exc as Exception Message_error.Text() = "Send failure: " + exc.ToString() End TryEnd Sub And this is the exception returned:Send failure: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x8004020F): The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for mike@yahoo.com --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at ASP. forgotten_password.aspx. obtain_Password (Object Sender, ImageClickEventArgs E) in C:\Inetpub\wwwroot\market\forgotten_password.aspx:line 4
Refering to a textarea & RadioButtonList in SELECT statement   (150 Views)
I'll probably look really silly for asking this question, but it's been baffling me for a week now (stupid I know).I am tring to pull data from an Access database, depending on the options selected on a form. I have tried various formats for my statement but only the most basic works (i.e. SELECT Abb1, Abb2, Abb3, Abb4, Abb5, Abb6, Abb7 FROM Abbreviations).Let me start from the beginning. I'm trying to create a crossword solver using ASP.net, the user enters data into the form, which returns the possible solutions to a clue into a dataGrid. There are 2 RadioButtonLists on the form, one which relates to the name of the table in the database, and the other which refers to the number of letters for each solution in the table. There is also a textarea for the user to enter a clue.What I would like to do is depending on the Clue Type (Anagram, Abbreviation, etc) (1st RadioButtonList) I want to select data in the table according to the number of letters (selected from the 2nd RadioButtonList), and the clue entered.My coding so far goes as follows:Dim strConnection As String = "Provider = Microsoft.Jet.OleDb.4.0;Data Source = C:\Inetpub\wwwroot\WebApplication1\Project\CrypticCrosswordSolver\Project.mdb;" Dim ojbConnection As New OleDb.OleDbConnection(strConnection) Dim No_Letts As Integer = No_Letters.SelectedItem.Value Dim ClueBX As String = Clue_box.Text Dim strSQL As String = "SELECT Abb1, Abb2, Abb3, Abb4, Abb5, Abb6, Abb7 FROM Abbreviations WHERE ((' " & No_Letts & " ' = NoLett1) AND (Word = ' " & ClueBX & " '))" Dim ojbCommand As New OleDb.OleDbCommand(strSQL, ojbConnection) ojbConnection.Open() AdvancedSolutions1.DataSource = ojbCommand.ExecuteReader() AdvancedSolutions1.DataBind() ojbConnection.Close()I have previously tried: Dim strConnection As New System.Data.OleDb.OleDbConnection("Provider = Microsoft.Jet.OleDb.4.0;Data Source = C:\Inetpub\wwwroot\WebApplication1\Project\CrypticCrosswordSolver\Project.mdb;") Dim myCommand As String Dim No_Letts As String Dim ClueBX As String No_Letts = No_Letters.SelectedItem.Value ClueBX = Clue_box.Text strConnection.Open() If ClueTypeList.SelectedItem.Value = "Abbreviation" Then myCommand = "SELECT [Abbreviations].[Abb1], [Abbreviations].[Abb2], [Abbreviations].[Abb3], [Abbreviations].[Abb4], [Abbreviations].[Abb5], [Abbreviations].[Abb6], [Abbreviations].[Abb7] FROM [Abbreviations] WHERE ([Abbreviations].[Word]= ' " & ClueBX & " ') AND ((' " & No_Letts & " ' = [Abbreviations].[NoLett1]) OR (' " & No_Letts & " ' = [Abbreviations].[NoLett2]) OR (' " & No_Letts & " ' = [Abbreviations].[NoLett3]) OR (' " & No_Letts & " ' = [Abbreviations].[NoLett4]) OR ( ' " & No_Letts & " ' = [Abbreviations].[NoLett5]) OR ( ' " & No_Letts & " ' = [Abbreviations].[NoLett6]) OR (' " & No_Letts & " ' = [Abbreviations].[NoLett7]));" End Ifrepeated for each tableAnd alsoSELECT Abb1, Abb2, Abb3, Abb4, Abb5, Abb6,Abb7 FROM Abbreviations WHERE (Word= ' " & ClueBX & " ') AND ((' " & No_Letts & " ' = NoLett1) OR (' " & No_Letts & " ' = NoLett2) OR (' " & No_Letts & " ' = NoLett3) OR (' " & No_Letts & " ' = NoLett4) OR ( ' " & No_Letts & " ' = NoLett5) OR ( ' " & No_Letts & " ' = NoLett6) OR (' " & No_Letts & " ' = NoLett7));"for each table.I think there was another one, but I can't remember what it was now. It didn't work anyway!Can anybody see where I am going wrongNo_Letters and Clue_box are Protected Withevents in the #Region part of the code behind (I'm using Visual Studio.net, language VB
how to submit user name and password to a server?   (181 Views)
I have a username textbox, password textbox, and a submit button. Users will input username, input password, and then click on the submit button. Now suppose I have want to input the username, password, and click on the submit button manually. How Do I write all of this into a url and send it examaple,my website is www.sample.comthe page that will recieve the username and password is"login.aspx"I dont want to type in the username and password and press the submit button. i would like to type the username and password into a url form Like the stuff that one can do with an ftp.example ftp://www.sample.com:username=jack:password=jillI hope you people can understand what im trying to do here. How do I set it up like the ftp url and send it instead of typing the infos manually and clicking on the submit button. Thankx a bunch in advance.
Question about the FileSystemWatcher   (273 Views)
I'm using a FileSystemWatcher within an ASP.Net application with VB.Net code behind pages. The FileSystemWatcher resides on Server "A" and correctly captures .txt files being written to the watched folder on Server "B". However, these events are not being written in the textbox on the webform. The syntax I am using for this event is: If e.ChangeType = IO.WatcherChangeTypes.Created Then txtFileActivity.Text &= "File " & e.FullPath& " has been created" & vbCrLfEnd IfUsing the debugger I've stepped through the code, and it does indeed execute, but it doesn't display.Any assistance will be appreciated
Http status error   (181 Views)
When trying to access a web service on one machine from the client app on another machine I get the following error:The request failed with http status 405: Method not allowed.Any ideas
.Net Install no .aspx configuration in IIS   (165 Views)
HiI have just built a development machine which is a Windows 2000 OS with SQL 2000 Server and Visual Studio .Net.However I have noticed a few problems with the IIS configuration. The virtual site configuration in IIS does not show any of the file extensions for the .Net platform. So basically if I try and call a .aspx or any other .net file extension the file is not loaded. So i thought I would configure IIS to point at the aspnet_isapi.dll however I cannot find this file. I have looked under SystemRoot/WINNT\Microsoft.NET\Framework\v1.0.3705\ but to no evail. Can I just copy this file from another machine andf place it under this directory Or is there a configuartion file that I can use to get IIS to look for all these filesMany
Crystal Reports source at runtime   (143 Views)
I'm developing an application that use custom data provider class.Now I've to biul reports but as I don't have fixed dataset and fixed connections I've some trouble building the report at desing time (I've only unbound fields) and at runtime (Assigning data source to report and fields).Anyone have a good idea about how to solve these problems10x Stevie B. Gibson
.NET C# Newb - Form fields not posting???   (85 Views)
I'm having a strange problem with form fields not being available to my .aspx.cs pages after being POSTed from another page. In order to rule out any interference from other features, I created two simple pages "test.aspx" and "test2.aspx" -- test posts a form to test2.=== test.aspx =========== ============================ test2.aspx.cs =======using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class test2: System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { foreach (string param in Request.Form) { Response.Write(param + "=" + Request.Form[param] + ""); } }}=========================(test2.aspx is empty except the default stuff Visual Studio adds when creating a new web form)When I build this and load it in my browser, there is nothing output on test2.aspx. HOWEVER, if I debug it, using F5 in Visual Studio, then it works as expected.I have tried removing the "Form" and just looking for the POSTed value in Request.Params. When I do that, I see all of the request values, cookies, etc, but still not the form field value (again, it does show up, as expected, when debugging).What am I doing wrong, here Please help
Email for confirmation and validation   (165 Views)
On a lot of sites when you join a group or request a product or service an email is generated with a unique key and sent to the user. The user must click a link in the email to be directed to a web site where they may be prompted to enter the unique key or perform some other authentication task.Does anyone have a link to a tutorial or an example of how this is done I want to shoehorn it into an existing web site if possible - the site runs on IIS and uses a LOT of .NET and C#, so those kinds of examples would be best. The emails are sent from the data server behind the web site, and there are a lot of services already being managed there.Of course, I'm not a fan of wheel reinventing, so if there's a product out there that I can buy completed and use I'll look at that option, too. -Richard RayJackson Hole Mountain Resort
can I convert a number to a date?   (210 Views)
I'm pulling a number formatted field () from an Oracle table, and I want to display it as a date.Here's what it looks like in the database: 20081201I was hoping I could do something like this # Eval("AP_PAYMENT_DATE_FK_KEY", "{0:mm/dd/yyyy}") %> to display it in a date format...but no go.
Reset or Clear Form after submitting   (130 Views)
How can a form be cleared or reset of input after the form has been submitted.This is to prevent the user from using the PREVIOUS button to go back and re-submit the form.
Query with tables from Multiple Connections   (184 Views)
Here's the situation:I have two DB connections ConnA (DB2) and ConnB (SQL Server).I need to bind a datagrid to the results of a query which joins a table from ConnA to a table from ConnB.Can someone please tell me how I should be going about thisI'm relatively new to asp.net so I'm only familiar with associating a Command object with a single DBconnection (then binding the datagrid with a datareader). It doesn't seem like the good old standby is going to work in this case...
Login controls need SQL Express too???   (110 Views)
I'm trying to start using the login controls for v 2.0, and get the following error:An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. SQLExpress database file auto-creation error: The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist. If the applications App_Data directory already exists, the web server account only requires read and write access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the applications App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database. Sql Server Express must be installed on the machine. The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts. We have SQL Server 2005 on the machine, but do you have to have Express to
Web Service Deployment   (105 Views)
I'm using the .NET 2.0 framework developing locally and running from the filesystem. This works fine while in development. In the web.config file of the site it references "localhost:4625\etc.." as the location of the web service.Then when I deploy this to the webserver I'm changing ports for the service to "8082". I get a "Server did not recognize the value of HTTP Header SOAPAction" message.I found a way to correct this by manually editing the .disco .wsdl files (replacing all of the references to "localhost:4625" with "localhost:8081").I don't recall having to do this in the past (but I don't think that I developed on the local filesystem). Is this the standard way of doing this or am I missing somethin
JS and Textboxes   (196 Views)
I have an ASP.Net page that has two text box controls on it. One if to collect an email address, and the other to collect a home airport code.When the page loads, in the text boxes, I want to have appear "Enter e-mail address" and "Enter Airport Code", respectively. I've set the Text property of the text boxes to show this, of course. However some javascript I'm using is creating behaviors that isn't quite right.In the textbox's onfocus event, I have "this.value=''" which works properly, but I do not want it to fire off on page load because it is clearing out the first of the two text boxes I have. The only other control I have on this page is a submit button, and in my code I placed btnSignup.Focus(), but that button is not receiving focus on Page Load. So this method isn't quite right.The behavior I am after is, after page load and the text boxes display their initial values, if the user types something other than the default value in either of the text boxes, I dont want the text to be cleared if the textbox gains focus again; otherwise, if a text box gains focus and the text in the box equals the initial values, I want them cleared.Any help and direction to some web sources would be great. I've searched Google but I don't think I'm searching the proper term because I'm not finding anything useful. As always,
Putting user email address all in the BCC field?   (207 Views)
Hi ;I have a basic newsletter app, written in ASP.NET 2.0, for a client. They have a static list of about 300 users that will recieve this newsletter over the course of the next 6 months.I have tried to make the newsletter app as simple as possible to suite their budget. My only concern is that the sending bombs during the send, and only 100 users recieve the mail (for e.g.). Do you think it is possible, or it is a good idea, for me to create a single bcc field that contains all 300 user mail addresses. That way only a single mail gets sent. And if it fails, no-one will recieve a mail. Is there a limit to BCC addresses etc.I would appreciate any input in this matter. Sean.
ASP.NET 2.0 - Menu control and dynamic SiteMap   (238 Views)
,I want to create 2 XML based web.sitemap items to populate a single menu on a single master page. There are two types of userse: Admins and End Users.I'm hoping that based on security I can toggle between the two.Outside of using a database, can this be done via VB.NET code within a preload even
Problem with date picker   (194 Views)
I'm using the calendar control on my webpage. The pop up works fine, however when I select the a date the pop does return the value selected to the text box ... it doesn't seem to do anything.can anyone help Here's the code on aspx page:CODE Calendar Actual Calendar aspx:CODE{/CODE}Code behind the Calendar.aspx form:[CODE]public partial class Calendar : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void Calendar1_SelectionChanged(object sender, EventArgs e) { string strjscript = ""; strjscript += "window.opener." + HttpContext.Current.Request.QueryString["formname"]; strjscript += ".value = '" + Calendar1.SelectedDate.ToString("d") + "';window.close();"; strjscript += ""; //Don't ask, tool bug. Literal1.Text = strjscript; } protected void Calendar1_DayRender(Object source, DayRenderEventArgs e) { if (e.Day.Date.ToString("d") == DateTime.Now.ToString("d")) { e.Cell.BackColor = System.Drawing.Color.LightGray; } }
capturing time in session_start() of global.asax   (131 Views)
Hi all,I'm trying to set a variable inside of Session_Start of global.asax that will initialize the time a user starts using an asp.net app. I have tried doing this in 2 different ways:begTime = DateTime.Nowand Session["begTime"] = DateTime.NowHowever when I try to access this from outside global.asax it initializes bedTime to 1/1/1 or nullCan anyone recommend what is the proper method of doing thi
asp.net 2.0 html control   (141 Views)
Hi ,I have written a page in 1.1 which simply traverses all the controls in the form using HtmlForm form = (HtmlForm)Page.FindControl("form1");foreach (Control Ctrl in form.Controls) {}Now, I am using 2.0 framework and this page is using a master template. I read that the form's called aspnet. However, I can't seem to get this bit working:HtmlForm form = (HtmlForm)Page.FindControl("aspnet");foreach (Control Ctrl in form.Controls) {}I would appreciate any help over this
Send Crystal Report Straight To Default Printer   (125 Views)
I have a application that I am building in ASP.net using Visual Studio 2005. One of the components is a crytal report that shows the details of a new record entered into the application.I want to send this report straight to the user's printer. How do I do this Keep in mind I am a novice DotNet developer. ProDev, MS Access ApplicationsVisit me at ==> http://www.prodev.usMay God bless you beyond your imagination!!!
pls help   (205 Views)
can u pls help ive got a code:and on db:id | datefield | description1 | june 8 2006 | june description2 | may 2 2006 | may description3 | july 6 2006 | july description4 | jan 16 2006 | jan descriptionbut when i run the code it gives:idlabel | descriptionlabel1 | Write This Bit 2 | Write This Bit 3 | Write This Bit 4 | Write This Bit what i want is to give me an output like this one:idlabel | descriptionlabel1 | june description2 | Write This Bit 3 | july description4 | jan descriptionam i missing somthing in comparing the DateTime.Now.ToString
data only writes if (!IsPostBack) is removed from page_load   (191 Views)
I know, it sounds strange, and I'm sure it's because I don't understand postbacks as well as I should. Here's the deal: I have a survey I've been working on that's completely db-generated; I'm just reloading one page with new data after they complete a section. The submit button's onclick event goes through the controls, pulls out the data and writes it, and then I use response.redirect to refresh the page with the new section ID. If I leave this in Page_Load:CODEif (!IsPostBack){ BindData();}the page goes to the next section but it does not write anything to the db. If I comment out the postback condition, it writes the data TWICE to the db & then goes to the next section.What am I doing wron
Return cursor type from oracle SP   (131 Views)
Hi ,I am able to run Oracle SPs that return varchar output results. But when I try to run SPs with output variables that have a Cursor type, the result is unreadable.The connection opens fine and executes correctly (see code below), but I cannot read the value returned from the cursor type.When I print cmd.Parameters.Item("result").Value, I get:{System.Data.OracleClient.OracleDataReader} [System.Data.OracleClient.OracleDataReader]: {System.Data.OracleClient.OracleDataReader} --------------------------------------------Dim cmd As OracleCommand = New OracleCommand Dim rowId As OracleString cmd.Connection = OraConnClient cmd.CommandText = "pta_auction_pkg.runner_up" cmd.CommandType = CommandType.StoredProcedure cmd.Parameters.Add("p_tnumber", OracleType.VarChar, 20).Value = OldID cmd.Parameters.Add("p_netid", OracleType.VarChar, 20).Value = Tnumber cmd.Parameters.Add("result", OracleType.Cursor).Direction = ParameterDirection.Output OraConnClient.Open() 'Dim rowsAffected As Integer = cmd.ExecuteOracleNonQuery(rowId) cmd.ExecuteOracleNonQuery(rowId) 'cmd.ExecuteReader() RunnerUp = cmd.Parameters.Item("result").Value CloseOracleConnection()
Should I handle selectedindexchanged on client side?   (193 Views)
I have a page that'll generate between 4 & 10 dropdowns, with associated textboxes with their visibility set to false. Each time a dropdown is changed, I have it using its selectedindexchanged function to determine if the value of the dropdown is one in particular. If it is, it shows the textbox; otherwise, it hides it. This requires a lot of postbacks to the page, and I was kinda hoping to find another way to do this that'll be a bit less taxing to the user. So, is there a way to do this client-side, and is it a good ide
how to maintain scroll position across postback   (137 Views)
,I need to know how to link to a given section of the page using asp .netI have a page with a button , every time the button is click a new block of controls is added to the page.As a result the lengh of the page increases and every time time a postback occur the page is display from the top and I need to scroll down to see my latest added block. (maintain scroll position)That is uncorftable for a user .I use SmartNavigation="true" on the page directive and it partially solve the problem what I really want to do is scroll to the bottom of the page every time that the page is loaded.I am using this but it doesn't workand access that with sub pageLoad(.....)response.Redirect("myurl#bottom")end subwill appreciate any hel
Real Time Data Transfer...   (311 Views)
Just a hypothetical question regarding entry of data from the field to the server for real time processing. If you had to place 90 people in the field to collect data, and then turn around and immediately send this data to the server for processing (and subsequent use in charts, etc on the web), all in Real Time, what might be a good approch to takeUse a specialized palm pilot device Cell Phone I/0 If you were faced with this problem, which approach might you take The idea of having an incoming email 'trigger' an event on the server, etc., crossed my mind.