Repeating a header for a datagrid


Has anyone out there gotten the header on a datagrid to repeat

I have a report that I would like to simply repeat the header every 6 lines, and am having a helluva time getting it to work.

\t
Posted On: Wednesday 2nd of January 2013 02:28:42 AM Total Views:  270
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




hidden column in gridview (aspnet.vb)

hi there... I want to ask about a gridview. In my program, i create gridview to display xml data. But not all data show, there is a data in gridview column that i set into not visible. And than, i want to read the data in hidden column with gridviewrow, but it didn't work. I cant find cell index.... so is there any way to solve this problem\t
VIEWS ON THIS POST

163

Posted on:

Friday 16th November 2012
View Replies!

Retrieving Checkbox out of a Gridview (SOLVED)

, I've got a gridview and I have a template column that has a checkbox control inside. When I render the gridview, I want to color other columns based on whether or not that column is checked. Here's the code I've written trying to do so: protected void GridView1_OnRowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { CheckBox chkBox = (CheckBox)e.Row.FindControl("tmpChkMath"); if (chkBox != null && chkBox.ID == "tmpChkMath" && chkBox.Checked) e.Row.Cells[(int)ColumnIndices.MathScore].BackColor = System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Green); else e.Row.Cells[(int)ColumnIndices.MathScore].BackColor = System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Red); } } and here's the asp pertaining to the gridview: ...and so on The issue is, the Checked property of chkBox is always false, even when the checkbox in the gridview is checked (by the way, this column is just populated from a query, it's not editable or anything). I think the problem lies in the FindControl() method. I've scoured the net and found some people with the same problem, but no solutions :\.
VIEWS ON THIS POST

218

Posted on:

Friday 16th November 2012
View Replies!

Append and Update records

Is there an equivalent in asp.net of an Access Update query and Append query I want to add 20 new records, one for each employee for a specified week to a SQL Server table.If the answer is yes, could someone give me some sample code or a place to find it. TIA
VIEWS ON THIS POST

154

Posted on:

Monday 19th November 2012
View Replies!

Runtime compilation error CS1026 in c# when we use linq statement

We have an application developed on VS2008 [Asp.Net & C#], in this application we provide the facility to the user to write his/her business logic code. For that purposes we maintained a Businesslogic.cs file where user can write his/her code and our application build it as a BusinessLogic.dll file at runtime. But the problem is when we introducing Linq statement/code into the BusinessLogic.cs file then it generated compilation error [CS1026 ]. Note that, when we build the dll from VS2008 environment then it working fine with the same code which we write into the BusinessLogic.cs & don't generated any compilation error. For your information, we using the following code as follows:- private bool StartDLLCompite(string sNameSpace) //sNameSpace holds the all BusinessLogic code { bool IsOK = CompileSource(sNameSpace, "BusinessLogic\\BusinessLogic.dll"); return IsOK; } private bool CompileSource(string sSource, string sDLLFile) { bool IsProcess = false; string sFinalSource = string.Empty; string sTempfile = string.Empty; Exception DLLCreationerror = new Exception(); try { sFinalSource = sSource; string sSourceFile = String2File(sFinalSource); sTempfile = sSourceFile; string sErr = string.Empty; if (System.IO.File.Exists(sDLLFile)) { System.IO. File.Delete(sDLLFile); } sErr = BuildCustomDLL(sSourceFile, sDLLFile); } catch (System.Data.SqlClient.SqlException ex) { } finally { } return true; } private string BuildCustomDLL(string sSourceFile, string sDLLFile) { string cErr = string.Empty; int i = 0; //System.CodeDom.Compiler.CompilerError oErr; Microsoft.CSharp. CSharpCodeProvider oCodeProvider = new Microsoft.CSharp.CSharpCodeProvider(); //System.CodeDom.Compiler.ICodeCompiler oCompiler = oCodeProvider.CreateCompiler(); System.CodeDom.Compiler. CompilerParameters oCompilerParam = new System.CodeDom.Compiler.CompilerParameters(); oCompilerParam = GetDefaultNameSpace(oCompilerParam); oCompilerParam.GenerateExecutable = false; oCompilerParam.OutputAssembly = sDLLFile; System.CodeDom.Compiler. CompilerResults oCompilerResult; //oCompilerResult = oCompiler.CompileAssemblyFromFile(oCompilerParam, sSourceFile); oCompilerResult = oCodeProvider.CompileAssemblyFromFile(oCompilerParam, sSourceFile); foreach (System.CodeDom.Compiler.CompilerError oErr in oCompilerResult.Errors) { if (oErr.IsWarning) { cErr += "Warning No. : " + oErr.ErrorNumber + Environment.NewLine; cErr += "Warning Text : " + oErr.ErrorText + Environment.NewLine; } else { cErr += "Line No. : " + oErr.Line.ToString() + Environment.NewLine; cErr += "Column No. : " + oErr.Column.ToString() + Environment.NewLine; cErr += "Error Text : " + oErr.ErrorText + Environment.NewLine; cErr += "========================================" + Environment.NewLine; } } return cErr; } //We using the following reference private System.CodeDom.Compiler.CompilerParameters GetDefaultNameSpace(System.CodeDom.Compiler.CompilerParameters oCompilerParam) { oCompilerParam.ReferencedAssemblies.Add( "System.dll"); oCompilerParam.ReferencedAssemblies.Add( "System.Web.dll"); oCompilerParam.ReferencedAssemblies.Add( "System.Xml.dll"); oCompilerParam.ReferencedAssemblies.Add( "System.Data.dll"); oCompilerParam.ReferencedAssemblies.Add( "System.configuration.dll"); oCompilerParam.ReferencedAssemblies.Add( "G:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\v3.5\\System.Core.dll"); oCompilerParam.ReferencedAssemblies.Add( "G:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\v3.5\\System.Data.Linq.dll"); oCompilerParam.ReferencedAssemblies.Add("G:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\v3.5\\System.Web.Extensions.dll"); oCompilerParam.ReferencedAssemblies.Add( "G:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\v3.5\\System.Xml.Linq.dll"); oCompilerParam.ReferencedAssemblies.Add( "G:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\v3.5\\System.Data.DataSetExtensions.dll"); oCompilerParam.ReferencedAssemblies.Add( "H:\\MyFolder\\MenuGeneration\\ResourceConfig\\bin\\Debug\\ResourceConfig.dll"); oCompilerParam.ReferencedAssemblies.Add( "H:\\MyFolder\\MenuGeneration\\DataControl\\bin\\Debug\\DataControl.dll"); oCompilerParam.ReferencedAssemblies.Add( "H:\\MyFolder\\MenuGeneration\\DataLayer\\bin\\Debug\\DataLayer.dll"); oCompilerParam.ReferencedAssemblies.Add( "H:\\MyFolder\\MenuGeneration\\DataService\\bin\\Debug\\DataService.dll"); oCompilerParam.ReferencedAssemblies.Add( "H:\\MyFolder\\MenuGeneration\\MultiSelectComboBox\\bin\\Debug\\MultiSelectComboBox.dll"); oCompilerParam.ReferencedAssemblies.Add( "H:\\Telerik.Web.UI.dll"); return oCompilerParam; } Please help regarding the above matter.
VIEWS ON THIS POST

202

Posted on:

Friday 23rd November 2012
View Replies!

add Controllers GridView Dynamically

i have DataTable object and i put data into it by Creating DataRow take from dataset and finally i set the Gridview that DataTable what i want is i want add controller like link button into DataTable dynamically so then i can view those in gridview. i want see these controller not all the rows so i have to dynamically add those. so if any one knows how to add controllers into datatable dynamically please help me.
VIEWS ON THIS POST

362

Posted on:

Friday 23rd November 2012
View Replies!

Major project

Hi fr8s,, i need a major project synopsis to summit at my college..so could anyone help me out plz email me to {REMOVED}
VIEWS ON THIS POST

107

Posted on:

Saturday 24th November 2012
View Replies!

menustrip

hi i want to create a menubar i know how to menustrip in gui, but asp.net is menustrip is disable.what are the step to create menubar in webpage
VIEWS ON THIS POST

127

Posted on:

Saturday 24th November 2012
View Replies!

How to track website users logged in

Hi all This is my first post here, and it's a general query. I have built websites before in classic ASP, where users are kept logged into a website by using the session object. Now I'm making the transition to .NET (C#), I'm wondering if I can still use the session object, and if so, is it wise to use it, or is there perhaps a better, more advanced facility in the .NET framework Cheers for any help/suggestions, Andy
VIEWS ON THIS POST

214

Posted on:

Saturday 24th November 2012
View Replies!

AJAX Accordion control error message

I put an accordion control within side a tab control and I get this error message all the time. "Type 'AjaxControlToolkit.Accordion' does not have a public property named 'AccordionExtender' but if I take the accordion outside of the tab control I don't have a problem. Is there something special I need to do
VIEWS ON THIS POST

259

Posted on:

Sunday 25th November 2012
View Replies!

Resolved - ASP.Net Newbie needs advice

Hi Everyone,We are designing a company intranet using ASP.Net/VB.Net/SQL7/Windows 2000. We also use terminal services which our users log into and therefore we don't want a login for the intranet. Could you please advise on the best way to verify our users Do we use the Active Directory or Forms Authentication or a SQL table There seems to be many ways but what's best in your experienceJohn
VIEWS ON THIS POST

207

Posted on:

Sunday 25th November 2012
View Replies!

SelectedValue - DropDownList {RESOLVED}

I am attempting to learn ASP.NET. I bought a book and have been progressing along fine. I have run into one issue that I cannot figure out. I have both .NET and the WebMatrix installed, I am doing the development on this particular page using the WebMatrix.Both the book and MSDN refer to the SelectedValue property of the DropDownList control. For some reason, I am not able to access that property. I receive the following error when I attempt to run any page using the property. My data bind is working, at one point I switched the code to refer to the SelectedIndex property. When I made a selection where the SelectedIndex value of the dropdown matches a value from my database, I do get a recordset returned, just not the correct data. It does prove that the data is binding though.Has anyone else run into this Did you find a resolution
VIEWS ON THIS POST

181

Posted on:

Sunday 25th November 2012
View Replies!

Performing Calculation In Gridview itemtemplate

I want to perform calculation in gridview :NetAmount=(ServiceAmount*Quantity)*Discount I had written code in rowdatabound but it is not working,i amnew to programming help me solve this proble i would appreciate if some one share ther knowledge my Axpx code is: function CalcSercode(ServiceAmount,Quantity, Discount,NetAmount) { var Quantity=parseFloat(document.getElementById(Quantity).value); var Discount= parseFloat(document.getElementById(Discount).value); var ServiceAmount=document.getElementById(ServiceAmount); var SerAmountValue = parseFloat((ServiceAmount * Quantity)-((ServiceAmount *Quantity)*Discount/100)); //var SellPriceValueRound = Math.round(SellPriceValue,4); var SerAmountValueRound = SerAmountValue; ServiceAmount.innerHTML= SerAmountValueRound ; } _____________________________________________________________ My cs code is; //TextBox TxtServiceCode = GridView1.Controls[0].Controls[0].FindControl("TxtServiceCode") as TextBox; //DataSet dss = new DataSet(); //SqlConnection MyConnection = new SqlConnection("server=prog; database=mydatabase;UID=sa;PWD=naco123;"); //SqlCommand sqlcmd = new SqlCommand("select * from [ServiceCode]", MyConnection); //SqlDataAdapter adp = new SqlDataAdapter(sqlcmd); //DataSet ds = new DataSet(); //adp.Fill(ds); //GridView1.DataSource = ds.Tables[0]; //GridView1.DataBind();
VIEWS ON THIS POST

243

Posted on:

Sunday 25th November 2012
View Replies!

GridView RadioButton

I really have searched for a while now, and haven't found anything quite like what I need (which was surprising, given that it can't be very uncommon). I'm writing a website for my company that allows vendors to view all of the drawings and documents from the projects they are associated with. The first page contains a dynamically-created GridView of project codes and descriptions, based on their credentials. From this page, they need to select a project, click a button, and be taken to the next gridview to select a drawing or document. Our engineers will also use this system, and they have access to MANY projects. So the initial GridView can contain hundreds of projects, and some projects contain tens of thousands of drawings. My dilemma is that I don't know how to find which radio button is selected and associate with the row contents, to populate the next gridview. My code is: and my first gridview is populated by: private void getDrawings() { SqlConnection conn = new SqlConnection(CommonSQLFunctions.GetConnectionString("Office Location")); SqlDataReader gridViewValues; conn.Open(); SqlCommand cmd = new SqlCommand(@"SELECT ProjCode, ProjDesc FROM ProjDir WHERE (DragnetLITE = '1')", conn); try { gridViewValues = cmd.ExecuteReader(); DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("ProjCode", typeof(string))); dt.Columns.Add(new DataColumn("Dash", typeof(string))); dt.Columns.Add(new DataColumn("ProjDesc", typeof(string))); while (gridViewValues.Read()) { DataRow dr = dt.NewRow(); dr["ProjCode"] = gridViewValues["ProjCode"]; dr["Dash"] = "-"; dr["ProjDesc"] = gridViewValues["ProjDesc"]; dt.Rows.Add(dr); } DrawingSelectGridView.DataSource = dt; DrawingSelectGridView.DataBind(); gridViewValues.Close(); } catch (SqlException ex) { ErrorMessage.Text = ex.ToString(); } finally { conn.Close(); conn.Dispose(); } } The "dash" entry is just inserting a dash between the project code and descriptions. I've tried messing around with the groupname, but nothing I've tried has worked. Of course, any help is greatly appreciated.
VIEWS ON THIS POST

164

Posted on:

Sunday 25th November 2012
View Replies!

How to get time of last request in asp.net

How can I get time of last request Sent in asp.net.. Actually I want to set automatic Idle timeout. So I planned to compare this time with current. Please Help me. Other solutions are also invited..
VIEWS ON THIS POST

299

Posted on:

Sunday 25th November 2012
View Replies!

What's wrong with this ASP contact form code ?

, I am trying to add a simple contact form that sends email to my website in ASP .. Here is the front-end HTML form , Fields marked (*) are required Email From:* Name: TelephoneNumber:* Street1: Street2: City: County: YourMessage: and here is the back-end form supposed to send the email .. I dont get any email when I check my email box to test it, Untitled Document
VIEWS ON THIS POST

201

Posted on:

Tuesday 27th November 2012
View Replies!

Forms Authenticatn unable 2 redirect aftr login

never mind. I was gonna answer but it's not ASP.NET with C#. This post has been edited by PennyBoki: 09 August 2010 - 09:20 AM
VIEWS ON THIS POST

148

Posted on:

Tuesday 27th November 2012
View Replies!

Connect to a database in html

I am doing my final in html, and we are using web expression 3. I am trying to connect to my database using vb, but I don't know the syntex to tell it that I want to use my input box on my web page as the string. I have never done this before in html, so I am lost. Any advice is apprecieted much. My input box is named TxtUser on my html page Dim ArrayData(3, 3) As String Dim intRow As Integer = 0 Dim strUser As String Dim strPass As String Dim ArrayLog() As String = {strUser, strPass} Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =C:\Users\Nathaniel More\My Web Site\ubuntu\base\datalogin.accdb;Persist Security Info=False;") Dim StrSQL As String = "INSERT INTO DATALOGIN(LOGIN, PASSWORD) values(@loguser, @logpass)" Dim command As New OleDbCommand() For intColumn = 0 To 1 ArrayLog(intColumn, intRow) = ArrayLog(intColumn) Next intColumn intRow += 1 command.CommandText = StrSQL 'Tells it that command is going to be text command.Connection = con 'Set the conection = to con command.Parameters.Clear() ' Clear the all parameters Dim ParameterDate As New OleDbParameter 'Set up the Parmeter for the date field in the data base ParameterDate.ParameterName = "@loguser" ParameterDate.OleDbType = OleDbType.Char ParameterDate.Size = 100 ParameterDate.Direction = ParameterDirection.Input ParameterDate.Value = ArrayLog(0) Dim ParameterTime As New OleDbParameter 'Set up the Parmeter for the time field in the data base ParameterTime.ParameterName = "@logpass" ParameterTime.OleDbType = OleDbType.Char ParameterTime.Size = 100 ParameterTime.Direction = ParameterDirection.Input ParameterTime.Value = ArrayLog(1) 'Now that the parmeters have been defined add them command.Parameters.Add(ParameterDate) command.Parameters.Add(ParameterTime) con.Open() command.ExecuteNonQuery() con.Close()
VIEWS ON THIS POST

160

Posted on:

Tuesday 27th November 2012
View Replies!

email

i developed the E-mail application.On SEND button Click i write the following code:MailMessage msg = new MailMessage();msg.From = new MailAddress(TextBox1.Text);string[] to = TextBox2.Text.Split(';');foreach (string t in to){msg.To.Add(new MailAddress(t));}if(TextBox3.Text!=""){string[] cc=TextBox3.Text.Split(';');foreach(string c in cc){msg.CC.Add(new MailAddress(c));}}if (TextBox4.Text != ""){string[] bcc = TextBox4.Text.Split(';');foreach (string b in bcc){msg.Bcc.Add(new MailAddress(b));}}msg.Subject=TextBox5.Text;msg.Body=TextBox6.Text;if(RadioButtonList1.SelectedValue=="HTML")msg.IsBodyHtml=true;elsemsg.IsBodyHtml=false;SmtpClient sc=new SmtpClient();sc.Host="localhost";sc.UseDefaultCredentials=true;sc.Send(msg);Response.Redirect("send.aspx");But the appliaction working.I send mail to Yahoo id.When i opened but there is no message in my Inbox.What is the wrong in the above code.Why there is no message in my inbox
VIEWS ON THIS POST

249

Posted on:

Tuesday 27th November 2012
View Replies!

Runtime error when trying to use Request.QueryString

I am passing a GET parameter called ProjectID from one aspx page to another. On the second page, I make an attempt to pull the value of ProjectID (an int) from the URL by using Request.QueryString[0]. ProjectID is the one and only parameter passed in the URL, which looks like this: http://......./WorkItemDetail.aspxProjectID=4I use the following code to try to get the ProjectID value from the query string, and then insert it into a sqldatabase. The insert actually works, but I get a runtime "index out of range" error. Here is my code:protected void SaveButton_Click(object sender, EventArgs e) {TextBox WorkItemDescription = (TextBox)this.GridView1.FooterRow.FindControl("WorkItemDescription"); TextBox RequestDate = (TextBox)this.GridView1.FooterRow.FindControl("RequestDate"); TextBox StartDate = (TextBox)this.GridView1.FooterRow.FindControl("StartDate"); TextBox CompletionDate = (TextBox)this.GridView1.FooterRow.FindControl("CompletionDate"); DropDownList Developer = (DropDownList)this.GridView1.FooterRow.FindControl("Developer"); TextBox Notes = (TextBox)this.GridView1.FooterRow.FindControl("Notes"); DropDownList StatusCode = (DropDownList)this.GridView1.FooterRow.FindControl("StatusCode"); this.WorkItemData.InsertParameters["ProjectID"].DefaultValue = Request.QueryString[0]; this.WorkItemData.InsertParameters["WorkItemDescription"].DefaultValue = WorkItemDescription.Text; this.WorkItemData.InsertParameters["RequestDate"].DefaultValue = RequestDate.Text; this.WorkItemData.InsertParameters["StartDate"].DefaultValue = StartDate.Text; this.WorkItemData.InsertParameters["CompletionDate"].DefaultValue = CompletionDate.Text; this.WorkItemData.InsertParameters["Developer"].DefaultValue = Developer.SelectedValue; this.WorkItemData.InsertParameters["Notes"].DefaultValue = Notes.Text; this.WorkItemData.InsertParameters["StatusCode"].DefaultValue = StatusCode.SelectedValue; this.WorkItemData.Insert(); this.GridView1.ShowFooter = false; }So first I find all the input controls in the footer, then I use the InsertParameters command and the Insert() method to insert the values of these controls into a new record in WorkItemData (a SqlDataSource). The bold line is the one that seems to be causing problems. I find it strange that the insertion does work, but I still get an error. I have also tried replacing Request.QueryString[0] with Request.QueryString["ProjectID"]. Both give the same results. How can I fix this
VIEWS ON THIS POST

188

Posted on:

Tuesday 27th November 2012
View Replies!

Adding link to the EditColumnCommand Footer

Does anyone know how to add a hyperlink to the footer of an "EditColumnCommand" column I am trying to add new records from the footer of my datagrid and wanted to use that space for my "Add" link
VIEWS ON THIS POST

129

Posted on:

Tuesday 27th November 2012
View Replies!

Error when trying to do URL rewriting

I'm trying to implement the URL rewriting technique found here to basically rewrite a URL from this:http://localhost/MyProj/TypeXXX/Page.aspxto this:http://localhost/MyProj/Page.aspxtype=TypeXXXIt worked for a little bit, but now I get this error that points to my web.config file:CODEDescription: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: Line 60:\t\t\t\t\t\tby Microsoft that offers a single logon and core profile services for member sites.Line 61:\t\t-->Line 62:\t\t Line 63: Line 64: I think what's happening is that the application thinks there's a duplicate web.config in a subdirectory when in fact it's the same directory. I'm at a loss as to how I can fix this. Does anyone have any insight into this problem
VIEWS ON THIS POST

215

Posted on:

Tuesday 27th November 2012
View Replies!

Validation summary problem

I have a validation summary control that displays error messages for any required fields not filled out.For my phone number field, I validate to make sure that the field is filled out, and then a second validation to see if it had been filled out with the correct number of digits.If I don't fill out this (and other) fields, the valdation summary generates the appropriate error messages for all fields.However, if I fill in this field, but fill it in incorrrectly, the validation summary displays an error message, but all of the other error messages that should display disappear.\tOnly the invalid entry message shows.Is this a .NET bug\tHas anyone else seen this
VIEWS ON THIS POST

255

Posted on:

Tuesday 27th November 2012
View Replies!

How to fire ASP.NET code from Javascript function?

I want to get a delete confirmation from the user through user of the javascript "confirm()" function and if yes then fire a server side sub routine.
VIEWS ON THIS POST

179

Posted on:

Tuesday 27th November 2012
View Replies!

Get single value from a datatable

I am trying to write a generic sub in VB to get a single (cell field) from a datatable.\tThis function will be used in several apps.\tHere is my latest attempt:\t\tSub GetGridField(ByVal pGrid As DataTable, ByVal nRow As Integer, ByVal nCol As Integer, ByVal pValue As String)\t\t\t\tDim myRow As DataRow = pGrid.Rows(nRow)\t\t\t\tDim myCol As DataColumn = pGrid.Columns(nCol)\t\t\t\tpValue = myRow(myCol)\t\t\t\tpValue = LTrim(pValue)\t\tEnd SubI have looked for code examples, but I think I must have a basic misunderstanding of how these things work, because I can't seem to apply them to my problem.\tMostly, I see examples that iterate through the entire table like this:Private Sub ColumnsDemo (ByVal myTable As DataTable)\tDim myRow As DataRow, myColumn As DataColumn\tFor Each myRow in myTable.Rows\t\t\tFor Each myColumn In myTable.Columns\t\t\t\tResponse.Write (myRow (myColumn))\t\t\tNext\tNextEnd SubI understand the concept here, but I am having trouble determining how to specify the column and row index without a "for each" loop.\tThe error my code above gives is "Cast from type 'DBNull' to type 'String' is not valid."\tI assume this means that whatever is being returned is coming out as null, since all the fields in my data table have a string in them.\tI'd appreciate any insight on this.\tA specific code example for these two lines would be helpful:Dim myRow As DataRow = pGrid.Rows(nRow)Dim myCol As DataColumn = pGrid.Columns(nCol)They are the ones that I can't seem to translate from examples.
VIEWS ON THIS POST

184

Posted on:

Tuesday 27th November 2012
View Replies!

NavigateURL of HyperlinkColumn - Container.Dataitem

I am trying to send a value to a javascript function as a parameter and invoke the function too as below:I dont know why its not working, i am getting all sorts of parser errors such as :Literal content ('
VIEWS ON THIS POST

177

Posted on:

Wednesday 28th November 2012
View Replies!

Membership.CreateUser without password question & answer

Membership.CreateUser takes arguments for username, password, email, password question, and password answer. However, in the current project, we're not using the security question and answer. Does it matter what is entered for the question & answer They're required, apparently.This works ... CODEDim Status As MembershipCreateStatusDim User As MembershipUser =\t\t\t\tMembership.CreateUser(txtUserName.Text, _\t\ttxtPassword.Text, txtEmail.Text, _\t\t"something", "else", True, Status)... but I didn't want it to come back and bite me at some point in the future
VIEWS ON THIS POST

136

Posted on:

Friday 28th December 2012
View Replies!

Loading resource files dynamically?

I have a website which needs translation. I am wondering if I could create language files and put them in a directory and then load then into the cache (if the files has been modified) and then load the resource files from the cache.Is this possible What function can I use to load a resource file from cache
VIEWS ON THIS POST

188

Posted on:

Tuesday 1st January 2013
View Replies!

HTMLInputFile giving "object reference not set to instance of object"

The subroutine getting called is:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click\t\t\t\t'Call Upload()\t\t\t\tDim FileInput As HtmlInputFile\t\t\t\tIf FileInput.PostedFile Is "" Then\t\t\t\t\t\tLabel2.Text = "No File specified"\t\t\t\tElse\t\t\t\t\t\tTry\t\t\t\t\t\t\t\tDim ServerFileName As String\t\t\t\t\t\t\t\tServerFileName = Path.GetFileName(FileInput.PostedFile.FileName)\t\t\t\t\t\t\t\tFileInput.PostedFile.SaveAs("C:\TestSaving\" & ServerFileName)\t\t\t\t\t\t\t\tLabel2.Text = "File " & ServerFileName & " uploaded successfully."\t\t\t\t\t\tCatch ex As Exception\t\t\t\t\t\t\t\tLabel2.Text = ex.Message\t\t\t\t\t\tEnd Try\t\t\t\tEnd If\t\tEnd Sub
VIEWS ON THIS POST

62

Posted on:

Tuesday 1st January 2013
View Replies!

ASP.NET Windows Integrated Security

This is the first time I'm useing Integrated Security, and I am probably missing something silly.I have IIS set to use Integrated Security and anonymous access is disabled.My web.config file is set to: \t\t\tThis causes the login prompt to appear when accessing the web form, and I cannot log in.\tI don't think that it is doing any real authentication.\tWhen I "allow" a specific user and "deny" another, anybody can get in. Does anybody know what I could be missing
VIEWS ON THIS POST

223

Posted on:

Tuesday 1st January 2013
View Replies!

INSERT data from Form to database

This is probably a really silyy question, but I just can't figure out why this isn't working!\tMaybe casting a fresh pair of eyes across it might help!What I'm trying to do is take the data, entered into a form, for there and pass it into a table in my Access 2000 database.I thought that I had the coding correct, but it appears not (as it's not inserting ANY of the data).Coding goes as followsCODE'Create the connection string to the database\t\t\t\tDim conString As String = ("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & server.mappath("LLDB.mdb"))\t\t\t\t'Set connection to the connection string\t\t\t\tDim oleConnection As New OleDBConnection(conString)\t\t\t\t'open connection\t\t\t\toleConnection.Open()\t\t\t\t'set OleDbCommand\t\t\t\tDim oleCommand = New OleDbCommand("INSERT [Area], [Client], [Division], [Reporter], [Country], [Well], [Task], [Event], [Lesson] INTO Testing VALUES ('" & dataArea & "', '" & dataClient & "', '" & dataDivision & "', '" & dataReporter & "', '" & dataCountry & "', '" & dataWell & "', '" & dataTask & "', '" & dataEvent & "', '" & dataLesson & "')")\t\t\t\toleCommand.Connection = oleConnection\t\t\t\t'close connection to database\t\t\t\toleConnection.Close()I've also tried the INSERT VALUES(data1, data2) INTO [tablename](column1, column2) but I didn't get that working either!
VIEWS ON THIS POST

94

Posted on:

Tuesday 1st January 2013
View Replies!

Best way to retain scroll position in Datagrids?

What would be the best method to re-display a datagrid as-is (i.e. when an error occurred in a Edit textbox) without having the grid re-display starting at the first row
VIEWS ON THIS POST

120

Posted on:

Tuesday 1st January 2013
View Replies!

OLEDB and Foxpro

Our team is having problems updating a FoxPro database through OLEDB.Getting and displaying data has not been an issue.We have a data adapter that has insert, update, delete and select statements.The parameter collection satisfies the requirements for our statements. the logic sits in a DLL (including data access).Calls are made from our aspx.vb page.Data appears to be transferred fine to the DLL (due to where it crashes and as proved through debugging).The error we continue to get is : "Object reference not set to an instance of an object".If we add records the crash will occur on the added line.If we modify records the crash will occur on the modify line.\tSame with delete.The line looks like: oDA.Update(oTable.select(nothing,nothing,Dataviewrowstate.modifiedcurrent)).If we take everything and translate it to SQL (which we have used for demo purposes) all is well. Please help.TBubbs
VIEWS ON THIS POST

75

Posted on:

Tuesday 1st January 2013
View Replies!

Need Help Using a Generic List with a Webservice Class

,I am importing a generic list into a class to test a webservice:Here is my TESTList class:Imports System.Collections.Generic _Public Class TESTList\t\tInherits List(Of TEST)End ClassHere is my class for the Getters and Setters: _Public Class TEST\t\tPrivate _TESTNum As String\t\tPrivate _Description As String\t\tPrivate _PCSList As New PCSList\t\tPublic Property TESTNum() As String\t\t\t\tGet\t\t\t\t\t\tReturn _TESTNum\t\t\t\tEnd Get\t\t\t\tSet(ByVal value As String)\t\t\t\t\t\t_TESTNum = value\t\t\t\tEnd Set\t\tEnd Property\t\tPublic Property Description() As String\t\t\t\tGet\t\t\t\t\t\tReturn _Description\t\t\t\tEnd Get\t\t\t\tSet(ByVal value As String)\t\t\t\t\t\t_Description = value\t\t\t\tEnd Set\t\tEnd Property\t\tPublic Property PCSList() As PCSList\t\t\t\tGet\t\t\t\t\t\tReturn _PCSList\t\t\t\tEnd Get\t\t\t\tSet(ByVal value As PCSList)\t\t\t\t\t\t_PCSList = value\t\t\t\tEnd Set\t\tEnd PropertyEnd ClassHere is my main test class that will fire on Page_Load:Public Partial Class WebServiceTest\t\tInherits System.Web.UI.Page\t\tProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load\t\t\t\tDim userName As String\t\t\t\tDim password As String\t\t\t\tDim vendorId As String\t\t\t\tDim jobId As Integer\t\t\t\tDim dttm As DateTime\t\t\t\tDim bol As String\t\t\t\tDim pieces As Integer\t\t\t\tDim Weight As Integer\t\t\t\tDim TESTList As VendorStatusWs.localhost.TEST()\t\t\t\tuserName = "proco1"\t\t\t\tpassword = "33915"\t\t\t\tvendorId = "proco"\t\t\t\tjobId = 13661619\t\t\t\tdttm = "2009-11-09T17:34:00-07:00"\t\t\t\tbol = ""\t\t\t\tpieces = 1\t\t\t\tWeight = 45\t\t\t\t'TESTList = "test"\t\t\t\tDim localwebservice As New localhost.VendorStatusWs\t\t\t\tlocalwebservice.SetStatusDrop(userName, password, vendorId, jobId, dttm, bol, pieces, Weight, waitTime, TESTList)\t\tEnd SubEnd ClassCould someone please show me how I would assign values to the variable TESTList\tI have an xml file that will doing an http post for these values:\t\t\t\t\t\t\ttestuser\t\t11111\t\ttest1\t\t123456782009-11-09T17:34:00-07:00\t\t 4444-33332 taped as 145145 I need to be able to step through my webservice class, and can do so now if the parms are all primitive types (string, integer, etc.) The problem is when I try to add this generic list and it complains about it not being a 1-dimensional array. I need to be able to bring in this list because there may be more than one item in some cases and thought a generic list might be a good solution since I'm using VS2005.Also, does it matter what order I'm reading in the parms In my test class the TESTList is the last parm, but in the xml file it is in the middle somewhat.Thank you very much to anyone who is taking the valuable time from your day to go through this. I would greatly appreciate any help on this, or even a better suggestion on reading in this list. It's for testing so it doesn't have to be perfect
VIEWS ON THIS POST

114

Posted on:

Tuesday 1st January 2013
View Replies!

Best way of designing this code

The problem ( done in .net1.1).Ive been asked to do some work on a site that uses a number of webservice calls.Currently, there is a web page that kicks off an asynch call to a Web service.The site then redirects to a results page, where it has some javascript that forces it to post back X seconds, where the code on PageLoad checks a database to see if the service has finished executing and has written the result set to the databaseI have been asked to take what is currently being used and extend it, so that on page 1 it makes multiple calls to the webservice, then redirects to page 2 To my mind the whole setup seems inefficient, so I want to propose some changes. Before I do, I need to check my thinking, and get it right in my own head.The simplest approach is to leave the pages as they are, and adding more network traffic (the 5 service calls, then the 5 * n calls to the database until the results are in)But one of the concerns is the amount of traffic that this will cause on the network, and the performance if there are a lot of people using this at the same time (Lots of postbacks triggering lots * 5 database calls)To make it smarter Im thinking of having a manager class that relates the sessionID to a callbackHandler class. When the webservice is complete I will then trigger the database call to pull back that portion of the results, and store that in a dataset in the object.I still get a postback every x seconds, but then all that is doing is forcing the page to rebind to the dataset to display the results, to my mind reducing the traffic to the database significantly.So, can anyone offer any critique of what Im planning to do, and secondly, is there a way I can trigger a page refresh / postback from the server, so I dont even need to have a javascript timer on the client (which seems dodgy to me, as if js is disabled, then the page will never show its results!)I know this may be a bit "moon on a stick", which is why Ive left the option of doing it the current way.K
VIEWS ON THIS POST

235

Posted on:

Wednesday 2nd January 2013
View Replies!

GridView Footer

I have a GridView control that displays 3 rows at a time. In the footer, I would like to display the following line: "Results 1-3 of 10 records".What is the best event in which to get at the footer Tried RowCreated and DataBound but they don't seem to work. Also, do I need to manually keep a count of which record # I'm on, or is there a property that I can access to get at that information I think that I can use GridView.Rows.Count for the total # of records.Thx.
VIEWS ON THIS POST

40

Posted on:

Wednesday 2nd January 2013
View Replies!

XML, XSD, DataSet???

I have several questions ...as to i have no clue about this. Any help would be appreciated.
VIEWS ON THIS POST

67

Posted on:

Wednesday 2nd January 2013
View Replies!

Strange DropDownList

I am in a fix. The drop down list of the ASP.NET behaves very strangely. I have added a drop down list to a web form and added about 200 items to it.When i view this dropdown list in Win2000, it is fine and opening up about 11 rows with scroll bars. But in Win XP, the same drop down list control opens up a big list whihc hits the roof of the web page. Now my requirement is to fix this bug or to rectify it to show only 11 or 15 rows. Please help
VIEWS ON THIS POST

58

Posted on:

Wednesday 2nd January 2013
View Replies!

Stored Procedure in Access?

I have a Union query I want to use, but it needs to accept a parameter. I want to store the query in my access database and pass the parameter to it. I don't know how to do that. How should I write it in access what kind of OleDb command should I useExample query: SELECT * FROM tblOrderDetails WHERE ORDERID =
VIEWS ON THIS POST

117

Posted on:

Wednesday 2nd January 2013
View Replies!

What is the difference between

What is the difference between
VIEWS ON THIS POST

63

Posted on:

Wednesday 2nd January 2013
View Replies!