How can I find out the current row in datagrid?


Hi There

I have a datagrid with a textbox control in column 2 which is set to autopostback=true.

I have linked the OnTextChanged event to a sub in the vb code but I cannot determine which row the textbox event was triggered from!

My sub looks like this :

Public Sub tbAddExtension_Text_Changed(ByVal sender As Object, ByVal e As System.EventArgs)
\t\t\t\t'get the row number (corresponds to year number)

\t\tEnd Sub

I thought the row index would be sent here as either 'sender' or 'e' but I cannot get the syntax right!

Does anyone know how to do this
Posted On: Wednesday 2nd of January 2013 01:09:12 AM Total Views:  415
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




Some data retrieval advice needed!!

Hi all,i am creating a page that depending on the viewType shows information about a particular venue, for instance, the query string:http://mypage/venue.aspxviewType=Facilitieswould only show the facilities section.\tNow, i need some help deciding the best way to tackle this, do i:A) pull all the data from the database and then pull what i need from the database, might be a bit trickier to code.B) pull the data from the database on demand, using a case statement to tell the page what to get from the database and what to display on the page\tCan someone please give me some advice
VIEWS ON THIS POST

188

Posted on:

Tuesday 27th November 2012
View Replies!

Can you TRIGGER the click event of a button or CheckBox in ASP.Net?

Public Sub chkMy_Click(byval sender as System.Object, \t\t\t\t\t\t\t\t\t\t\tbyVal\te as System.EventArgs)...End subWorks okay when I am on the form and I click the checkbox.However .. when I am elsewhere on the same form in code, how can I trigger this event since I need to run the code in it. I do not want to cretae a separate procedure and copy the whole code into it and call that instead. Is it possible to trigger the click event in ASP.Net as in Windows
VIEWS ON THIS POST

212

Posted on:

Tuesday 27th November 2012
View Replies!

URGENT! Major problem with ASP.NET

We have just run into a great deal of trouble attempting to get ASP.NET (v1.1.4322) running .NET apps on our Win 2003 Server. No matter what we have tried to do we keep getting the message:"Server cannot access application directory"The exact message is detailed here:http://support.microsoft.com/default.aspxscid=kb;en-us...Know, we have tried:i) Setting, resetting, checking, rechecking the permissions for the \ASPNET user. seems to be working fine.ii) Reconfiguring the ASPNET mappings using the aspnet_regiis.exe program.iii) Removed Sharepoint (I had read that this can make a mess of ASP.NET)iv) Used owsadm from the web server extension folder of common files.Does anyone have any ideas as to how we can fix this, preferably without having to mess around with IIS too much... down-time hurts :
VIEWS ON THIS POST

170

Posted on:

Tuesday 27th November 2012
View Replies!

Question about the Visual Studio .Net

Hi all,I have created a form with textfields, buttons and gridtables using Visual Studio .Net. I have compiled the project and every thing is working fine (include code behide of course). My question is what should I put into my server to make it works and can the client see exactly what I see on my browser when I compiled the project Example like i have the URL www.mysite.com, if I want to link to the form that I've just created should it be www.mysite.com/myform.aspx Practically, create the project in Visual Studio .net and reality how can we post it online....
VIEWS ON THIS POST

122

Posted on:

Tuesday 27th November 2012
View Replies!

Graphics / Drawing in asp.net

I am just starting to look into drawing graphics with asp.net. I have found an example that shows how to draw graphics and send them straight to the printer, using something like this:Sub pd_PrintPage(sender As object, ev As PrintPageEventArgs)\t\tDim f As Font = new Font("Verdana", 9)\t\tev.Graphics.Drawstring("hello",f,Brushes.Black,480,65)End SubI'm probably missing something really obvious but how do I draw a string, line or rectangle straight to my screen the examples I have seen have a sub with ev As PrintPageEventArgs which i can then only use when printing. Can anyone point me in the right direction
VIEWS ON THIS POST

185

Posted on:

Tuesday 27th November 2012
View Replies!

Encryption - Login and Password

I am calling an ASP application from my ASP.NET application - located on different servers.In the call I am passing the "Login" and "Password".If one of the serevers is down - The error page also lists the "login" and "Password" in the error message.Is there a good encryption and decryption method I can use to prevent this
VIEWS ON THIS POST

152

Posted on:

Tuesday 27th November 2012
View Replies!

Unable to open Web Project

I am trying to open a sample .vbproj file. The file has references to a URL which, I have not yet created - since I do not know what the settings are. Questions are:1. Everytime I open up a web project, do I first have to create the URL2. Can I make a setting for the IDE to create the web project everytime I open a new web project.3. As shown in the error message below, how do I create a Virtual directory for 'http://Localhost:/Controls' as there is a colon in the middle.The error message is: Unable to oen Web project 'Controls'. The file path 'C:\...\controls' does not correspond to the URL 'http://Localhost:/Controls'. The two need to map to the same server location
VIEWS ON THIS POST

141

Posted on:

Wednesday 28th November 2012
View Replies!

.ttx files on Crystal Report for ASP .Net

hi. would you know the different data types used to create a .ttx file for crystal reports i made one with one field of type numeric but when i tried to create a total field from this field, i dont get the deed result. it seems that my field is being treated as a string and not as a numeric field. what am i missing here would you give me the complete data types list
VIEWS ON THIS POST

202

Posted on:

Wednesday 28th November 2012
View Replies!

Using DataGrid/drop down list combination...

Is is possible to have the hyperlink column on a datagrid redirect to a page based on a selection from a drop down list\tFor example, when user clicks on hyperlink in Grid, there are 3 possibilities for redirecting to the next aspx page -- based on the user's selection from a drop down box.Also, as an aside, NetScape isn't reading the "height" of an aspx textbox so is hampering development for both Explorer and Netscape, any ideas here
VIEWS ON THIS POST

233

Posted on:

Wednesday 28th November 2012
View Replies!

Why use a OledbCommandBuilder Object?

I have been playing with a test program and am confused as to why I would use an OledbCommandBuilder object.\tThe book says that it is handy as it looks at the SelectCommand property you give it and it creates the appropriate commands from it.\tBut when I use it in my example, there is no difference.\tI end up creating an object(including the overhead involved)that doesn't seem necessary.CODESub GetAd(AdNumSent As Integer)SelectStatement = "Select * From Ads Where AdNum=" & _\tAdNumSentConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _\t"Data Source=c:\inetpub\wwwroot\simplyClassy\classydb.mdb"Connect.ConnectionString = ConnectStringAdapter.SelectCommand = _\tnew OleDbCommand(SelectStatement, Connect)' ClassyCB = New OleDbCommandBuilder(Adapter)Adapter.SelectCommand.Connection.OpenAdapter.Fill(ClassyDS,"Ads")End SubI can switch the comment and it will still work:CODEClassyCB = New OleDbCommandBuilder(Adapter)'Adapter.SelectCommand.Connection.OpenI don't see the use for this (at least in this context).Tom.
VIEWS ON THIS POST

223

Posted on:

Wednesday 28th November 2012
View Replies!

asp.net 4 trying to create a hyperlink in code behind

You need to set the "Text" property to something. The hyperlink is being created and rendered to the page. You are not seeing it because it is rendering this:
VIEWS ON THIS POST

222

Posted on:

Friday 28th December 2012
View Replies!

CreateUserWizard validation problem

I'm new to this asp.net control and decided to try and use it for creating new user accounts for a site.\tIts seems like a pretty cool control and I read some articles on customizing it and have customized it a little bit.My issue is this:The user goes to the site and when the page loads originally this control and most other controls have thier visible property set to false so they are all hidden.\tThe user can then press an image button that sets the visible property of the CreateUserWizard to true, and this works great.\tThe problem is if the user presses any other button the CreateUserWizard tries to validate the text boxes in the control instead of doing what the buttons actually are supposed to do.\tI even created a button that is supposed to run a sub that sets the CreateUserWizard visible property to false and that doesn't work either.\tIf I press that button the CreateUserWizard just keeps trying to validate its text boxes.Its like its trying to validate on a postback or something.\tI'm new to using this control so maybe I'm not doing something right.\tIs there some sort of postback property on the CreateUserWizard control that i need to set to keep it from trying to validate unless I press the create user button
VIEWS ON THIS POST

200

Posted on:

Friday 28th December 2012
View Replies!

web developer error

i have a webpage with an update button at the bottom that saves all the information from the page's text boxes. I have a checkbox at the bottom of this same page that the user checks when they are done with the page. So when the UPDATE button is clicked, i want to run a few if statements. Basically i want to know if it is possible to run scripts BEFORE any of the Update panel stuff The main error im getting is in the VB code. if the checkbox name is done1 i try to type something like:IF done1 = true but it always tells me that done1 is not declared. can anyone help
VIEWS ON THIS POST

463

Posted on:

Tuesday 1st January 2013
View Replies!

customvalidator... or?

HiI have a page with severeal dropdown lists that get values from a database, and I also add a "select option" to every dropdown list. I would then like to check each dropdown list, so that the user select anything else than the first option "select option". How can I check this
VIEWS ON THIS POST

118

Posted on:

Tuesday 1st January 2013
View Replies!

Adding a Conditional Statement in the Markup

I'm sure this is simple, but can someone tell me how to do a conditional in the mark-up of the ASP.Net pageExample (Beware psuedo code):\t\t\t\t
VIEWS ON THIS POST

169

Posted on:

Tuesday 1st January 2013
View Replies!

ASP.NET 2.0 - Menu control and dynamic SiteMap

,I want to create 2 XML based web.sitemap items to populate a single menu on a single master page.\tThere are two types of userse:\tAdmins 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 event
VIEWS ON THIS POST

179

Posted on:

Tuesday 1st January 2013
View Replies!

Storing dataset in a cache object.

I want to store a dataset in a cache object. I want to know how to refresh the dataset when the records in the dataset is updated or records in the database is updated by some user. What kind of dependency should i set between the dataset and the cache object.Please suggest
VIEWS ON THIS POST

140

Posted on:

Tuesday 1st January 2013
View Replies!

Removing an Image from Server

all!Was wondering if anybody could help me with this problem. I have managed to implement my image upload feature, offering a user the ability to replace their profile image.The only problem is that all of the old images still remain on the server and worse still if a user wishes to change back to the image they were using previously then an entirely new file is uploaded with a different name.The tutorial that I have used to perform the uploads is at: http://www.codeproject.com/aspnet/netimageupload.aspcould anybody help me add to this script to include functionality to remove an image before a new one is uploaded
VIEWS ON THIS POST

159

Posted on:

Tuesday 1st January 2013
View Replies!

security problem with a FileUpload

Here is my very simple program :Code behind :using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.IO;public partial class _Default : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e){DirectoryInfo theFolder = new DirectoryInfo(@"C:\temp\Server_Attachments\6");string Attachment = "";foreach (FileInfo nextFile in theFolder.GetFiles()){Attachment += "" + nextFile.ToString() + "";div1.InnerHtml = Attachment;}}protected void Attach_File(object sender, EventArgs e){FileUpload1.SaveAs(@"C:\Server_Attachments\6");}} HTML : Neither the hyperlinks, neither the upload are working :(- when I am clicking on the hyperlinks nothing is happening (although "Save target as" is working).- when I am trying to upload, I have got the error "Access to the path 'C:\Server_Attachments\6' is denied."On the server :It is obviously a security issue. I have checked which account was running the program and it is NETWORK SERVICE.On my laptop :I have run my program on my laptop and still got the same error. It means that with the "pseudo" web server enhanced in VS2005, the same problem occurs ("Access to the path X is denied").I have used System.Security.Principal.WindowsIdentity.GetCurrent().Name to check who was running the program and it is me. I have got administrator's rights on my workstation. I can copy a file in this folder on my own but not via ASP.NET.Any idea how to fix this problem (options in Visual Studio)
VIEWS ON THIS POST

195

Posted on:

Tuesday 1st January 2013
View Replies!

Writing a software manual

HiI am close to finishing my first software project and I need to write a software manul.As this is my first project, I dont know how to write a software manul.Is there any good example on the net that I can follow to write my manulKind regards
VIEWS ON THIS POST

382

Posted on:

Tuesday 1st January 2013
View Replies!

Datagrid: Multiple Rows Per Dataset Row

If a row of data in a dataset has a lot of columns the row displaying thedata in a datagrid will run way off the screen. What I'd like to do isdisplay a row of data over two datagrid rows so the user doesn't have toscroll horizontally. Essentially, I want to wrap a datagrid row (not text inindividual columns) with as much control as possible. For example, 10 columns on the first row and then 3 columns on the second row for the same physical record in the dataset.Is this possible\tOr is a datalist the only straightforward way to do this
VIEWS ON THIS POST

351

Posted on:

Tuesday 1st January 2013
View Replies!

Browsing to page and extracting HTML

I have the needed to send an email containing information that is contained on a another page in our application.\tI figured there was a way to fairly easily just navigate to the page and then scrape the html.\tI've done that in VB6 with the Internet Control.\tWhat is the best way to do that in ASP.NET\t
VIEWS ON THIS POST

408

Posted on:

Tuesday 1st January 2013
View Replies!

How can I get bgcolor='transparent' to work in netscape?

Hi ,I have a control with a transparent background color, which netscape is showing incorrectly (the background color shows up as blue). Is there any way to make the transparent background color to work in netscapeI'm doing the testing in Netscape 7.2
VIEWS ON THIS POST

444

Posted on:

Tuesday 1st January 2013
View Replies!

Request object

How do you get hold of the complete http message I want to write back to the browser what is being sent. Jon"I don't regret this, but I both rue and lament it."
VIEWS ON THIS POST

231

Posted on:

Tuesday 1st January 2013
View Replies!

Best way to do this?

I have several dropdowns on a page that are populated dynamically.\tThey're going to need to lose a value every time one of the other ones has a value selected (they all have the same list of numbers, but when one is chosen in one ddl, it needs to disappear from the rest).\tI'd like to do this on the client side, to avoid postbacks, but I'm not sure how to go about it.\tI have a script I use for populating other ddls based on the actions of one, but I can't figure out how to have it read the data in the ddls & edit it appropriately, since the controls are in a repeater & will have those lovely client IDs.Am I looking for something that can't be done
VIEWS ON THIS POST

285

Posted on:

Tuesday 1st January 2013
View Replies!

MultiSelect Dropdown

Guys,Can anyone point me a link or provide sample code that creates a multiselect dropdown list.I dont want to put a list box instead becasue of the space restrictions.I did google for sometime and could only find this control at http://www.easylistbox.com/demoMultiDropDown.aspxbut it is not free
VIEWS ON THIS POST

206

Posted on:

Tuesday 1st January 2013
View Replies!

Improving HTML performance of DataGrids

I'm looking for ways to improve the HTML performance of ASP.NET webpages using scrollable DataGrids... The larger the datagrid, the longer it takes for the webpage to display with the grid. That blank white page displaying for a few seconds between displays of the webpages can be annoying. Supposedly if I were able to remove as much whitespace between HTML tags as possible and use as few HTML & web controls as possible, the performance should improve somewhat, so I've heard. Does anyone know of a way or DataGrid etc properties to force the HTML code auto-generated by the datagrid to do thisExample of auto-generated HTML of a datagrid:\ttable data 1\ttable data 2\t\ttable data 3\ttable data 4\tchange totable data 1table data 2 table data 3table data 4\t\tAny ideas would be appreciated - changing from a scrollable grid to a page-number grid or forcing a small amount of data to show on the datagrid are not really\toptions that I'd want though.
VIEWS ON THIS POST

433

Posted on:

Tuesday 1st January 2013
View Replies!

Logical Tiers and DataReaders

Ok let me explain what I'm doing (or trying to do).I'm not a system architect so please forgive me if I have the concepts or terminology wrong.I have an n-tier app.\tIt consists of the presentation layer, the business logic layer, the data access layer, and the database.In the database I'm using stored procedures.\tThe database physically sits on a different server from everything else.I have a different assembly (the data access layer) that handles all calls to the db.The code behind files for the aspx pages contain calls to methods within the data access layer to retrieve data for display, etc.Now ... I'm passing data from the DAL in a datareader to the code behind files.\tIs this the best thing to do\tI understand that its better to use a dataset when passing data between tiers because it handles marshaling better.\tIs that a factor when its just logical tiers Also with inter-tier communication the whole chatty / chunky call deal doesn't really apply does it\tThat only becomes an issue when passing data between physical tiersAm I correct or wackoPlease advise
VIEWS ON THIS POST

124

Posted on:

Tuesday 1st January 2013
View Replies!

dialog box

is there a way to make a dialog box appear using asp.net (written using c# and vs2k3) failing that, any ideas how to hash something together that is a bit dialogy ____________________________________________________If you like a post, show you care by giving it a .
VIEWS ON THIS POST

230

Posted on:

Tuesday 1st January 2013
View Replies!

how to make a secure login validation...

Im new to asp.net and need whatever you tips and suggestions I can get. Heres a program that I would like to make but I dont know where to begin. I would like to make a program to keep all the username and password in some kind of secure database and use that to validate if they are an authorized user or not.Heres my scenerio,I would have a regular login screen with a username text and password textbox. When users submit their username and password, I would like asp to take their username, password, and look them up in the database to see if it matches. If it does, then the user will be directed to a member page. However, if the username and password doesn't exist in the database, it will direct the user to a, "sign up to be a member page." I have other questions regarding the sign up page but Ill keep it short for now.Thankx you all in advance.
VIEWS ON THIS POST

183

Posted on:

Tuesday 1st January 2013
View Replies!

Can I get the user login from my Intranet site?

I have been using server variables to get my user's login to our intranet site.\tNow I want to drop the security inside the building and use their windows sign on to authen. them.Now how do I get the logged in user
VIEWS ON THIS POST

135

Posted on:

Tuesday 1st January 2013
View Replies!

search word documents

any idea on something to search through a virtual directory of word (and some excel, but not necessary to search) documents\ti'd also rather not use ms index server.i'm creating an online document management system, and i would rather not keep an index of keywords for each document in the database.\ti'd like to be able to point to a directory and tell it to search through the word documents for a phrase.any suggestions would be much appreciated! mike griffith----------------------------mgriffith@lauren.commdg12@po.cwru.edu
VIEWS ON THIS POST

218

Posted on:

Tuesday 1st January 2013
View Replies!

Serious ASP.NET debugging problem

I have a problem that is really getting on my nerve! I have IIS on 2000 professional..I have ASP.NET..VS.NET.. I have 2 accounts on the computer..Administrator and User1 from Domain Dmn1.. When I log on as Admin I can create a project and debug it smoothly. when I log on as Dmn1/User1 I can create an ASP application but CAN NOT debug it!!!!!!!!...it says "Can not start debugging on server... Access is denied" well DMn1/User1 IS A MEMBER OF VS developers group and DEBUGGER USERS group!!!...it also has FULL control on C:\InetPub...what else should I check\t... I really need help!!.. oh..one more thing to mention...when I add Dmn1/User1 to Administrators group everything works fine!..BUT I DONT WANT TO DO THAT!!!..
VIEWS ON THIS POST

172

Posted on:

Tuesday 1st January 2013
View Replies!

Formating spreadsheet on the fly

I am trying to format a excel spreadsheet on the fly. The data is written to it using a streamwriter. I tried formatting the streamwriter but i can't do much with it. I need to add the header bold, with background color and grid lines to the cells.Can anyone please help me with itMy code:#region "Excel Methods"\t\t\t\tprivate void ExportGridViewToCSV(DataTable dt, string fileName)\t\t\t\t{\t\t\t\t\t\tstring path = HttpContext.Current.Server.MapPath(fileName);\t\t\t\t\t\tStreamWriter sw = new StreamWriter(path, false);\t\t\t\t\t\t\t\t\t\t\t\t// Write the headers.\t\t\t\t\t\tfor (int i = 0; i < dt.Columns.Count; i++)\t\t\t\t\t\t{\t\t\t\t\t\t\t\tsw.Write("\"" + dt.Columns[i] + "\"");\t\t\t\t\t\t\t\tif (i < dt.Columns.Count - 1)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsw.Write(",");\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\tsw.WriteLine();\t\t\t\t\t\t// Write the content.\t\t\t\t\t\tforeach (DataRow row in dt.Rows)\t\t\t\t\t\t{\t\t\t\t\t\t\t\tfor (int j = 0; j < dt.Columns.Count; j++)\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\tif (row[j].ToString().Trim() == " ")\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\tsw.Write("\"" + "" + "\"");\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\telse\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\tsw.Write("\"" + row[j].ToString().Trim() + "\"");\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\tif (j < dt.Columns.Count - 1)\t\t\t\t\t\t\t\t\t\t\t\tsw.Write(",");\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\tsw.WriteLine();\t\t\t\t\t\t}\t\t\t\t\t\tsw.Close();\t\t\t\t\t\t//var excelFile = new ExcelFile();\t\t\t\t\t\t//var worksheet = excelFile.Worksheets.Add("Worksheet1");\t\t\t\t\t\t//ws.Cells[0, 0].Value = DateTime.Now; // Type is System.DateTime\t\t\t\t\t\t//// Some Font Styles\t\t\t\t\t\t//ws.Cells[0, 0].Style.Font.Color = Color.Blue;\t\t\t\t\t\t//ws.Cells[0, 0].Style.Font.Italic = true;\t\t\t\t\t\t//ws.Cells[0, 0].Style.Font.Name = "Comic Sans MS";\t\t\t\t\t\t//ws.Cells[0, 0].Style.Font.Size = 150;\t\t\t\t\t\t//// Setting border on cell range\t\t\t\t\t\t//var mergedRange = ws.Cells.GetSubrangeAbsolute(0, 0, 10, 5);\t\t\t\t\t\t//var cellStyle = new CellStyle();\t\t\t\t\t\t//cellStyle.Borders.SetBorders(MultipleBorders.Right | MultipleBorders.Top, Color.Black, LineStyle.Thin);\t\t\t\t\t\t//mergedRange.Style = cellStyle;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHttpContext.Current.Response.Clear();\t\t\t\t\t\tHttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" + fileName);\t\t\t\t\t\tHttpContext.Current.Response.ContentType = "text/csv";\t\t\t\t\t\tHttpContext.Current.Response.WriteFile(path);\t\t\t\t\t\tHttpContext.Current.Response.End();\t\t\t\t}\t\t\t\t#endregion\t\t}}
VIEWS ON THIS POST

150

Posted on:

Tuesday 1st January 2013
View Replies!

Change CR image with code

Here's a tricky one. Does anyone have any idea how to change an image on a Crystal Report via codeI have an application that I am building in VS2005 (code behind is vb). I have a report that I want to use code to change the picture based on the recordid. The pictures are stored on a network file.Anybody, somebody, help me please. ProDev, Builders of Affordable Software ApplicationsVisit me at ==> http://www.prodev.usMay God bless you beyond your imagination!!!
VIEWS ON THIS POST

156

Posted on:

Tuesday 1st January 2013
View Replies!

GridView

I've created gridview user control.I fill it with data from xml.Then I load it into default web form to panel, but I don't see it.Why , My code on user control:namespace TxtWeb{\t\tpublic partial class DataGridES : System.Web.UI.UserControl\t\t{\t\t\t\tprotected void Page_Load(object sender, EventArgs e)\t\t\t\t{\t\t\t\t}\t\t\t\tGridView gridData = new GridView ();\t\t\t\tpublic DataSet ds = new DataSet();\t\t\t\tpublic GridView Grid\t\t\t\t{\t\t\t\t\t\tget\t\t\t\t\t\t{\t\t\t\t\t\t\t\treturn gridData;\t\t\t\t\t\t}\t\t\t\t}\t\t\t\tpublic void FillGridWithHTML(string xmlFile)\t\t\t\t{\t\t\t\t\t\tXmlDataDocument xmlDatadoc = new\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tXmlDataDocument();\t\t\t\t\t\txmlDatadoc.DataSet.ReadXml(xmlFile);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tds = xmlDatadoc.DataSet;\t\t\t\t\t\t\t\t\t}\t\t}}My code on Web form:namespace TxtWeb{\t\tpublic partial class _Default : System.Web.UI.Page\t\t{\t\t\t\tprotected void Page_Load(object sender, EventArgs e)\t\t\t\t{\t\t\t\t\t\tstring xmlFile\t\t\t\t\t\t\t\t="C:\\c#\\TestnaAplk\\TestnaAplk\\Podaci.xml";\t\t\t\t\t\tDataGridES dg = new DataGridES();\t\t\t\t\t\tdg.FillGridWithHTML(xmlFile);\t\t\t\t\t\tdg.Grid.DataSource = dg.ds;\t\t\t\t\t\tPanelGrid.Controls.Add(dg); \t\t\t\t}\t\t}} , I tried all that, but I still can't see grid.
VIEWS ON THIS POST

113

Posted on:

Tuesday 1st January 2013
View Replies!

CreateUserWizard CreatingUser Issue

.\tI'm using ASP.NET 2.0 and I have a page that does user registration.\tI've had it all working fine for a while until I noticed a couple things that it wasn't checking.\tIt wasn't checking to see if the email entered was a real email (by format) so I had to use a regularexpression validator to do so, which went fine.\tThe other problem though, is checking the password entered to see if it contains the username entered.\tThus, I would NOT want someone to register with the following info:Username: BobbyJoePassword: BobbyJoe1 (or bobbyjoe1)So by going into the CreatingUser event, I think I've successfully been able to check for the username being in the password and I can call the e.Cancel = true part of it to stop the registration process from continuing, but I can't figure out how to throw up an error about this.\tI've tried using a label or something but nothing seems to work.\tHas anyone else had any similar issues\t
VIEWS ON THIS POST

147

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

195

Posted on:

Wednesday 2nd January 2013
View Replies!

ControlState Thoughts

I'm currently using ControlState to pass simple objects between postbacks. Can anyone comment on this approach and some things I might want to considerI don't want to get half way through development and realize that our architecture was a giant flop
VIEWS ON THIS POST

133

Posted on:

Wednesday 2nd January 2013
View Replies!

using HTA with asp.net

I have to do some coding for another company to send automated emails.\tThey insist that instead of using a console app that I use an asp.net web page called from an HTA.\tI'm not familiar with HTA's and searched fruitlessly to find out something relevant.\tCan someone point me in the right direction so I can complete this assignment\t
VIEWS ON THIS POST

212

Posted on:

Wednesday 2nd January 2013
View Replies!

Programmatically selecting values in a list box

I've got a list box on a web form which, when loaded, uses data from a text field in a database to determine which values should be selected. When the user presses save, the selections from the list box should be resaved to the text field.This works fine if the user manually selects items from the list box, but if they don't make any changes and the list box shows just the selected items from the loading code then, when the user tries to resave, the selectedindex of the list box is showing as 0, even though the items are highlighted, so resave doesn't work.Here's the code:CODE'Firstly to select values from the list boxIf Not DataReader.GetValue(119) Is DBNull.Value Then\t\t\t\t\t\t\t\t'firstly get the values\t\t\t\t\t\t\t\tDim fullString As String = DataReader.GetValue(119)\t\t\t\t\t\t\t\t'check if there is a comma separator in the string, if not then there's only one\t\t\t\t\t\t\t\t'value, so use that\t\t\t\t\t\t\t\tIf InStr(fullString, ",") = 0 Then\t\t\t\t\t\t\t\t\t\tMe.AdditionalEmailList.SelectedValue = fullString\t\t\t\t\t\t\t\t'otherwise we need to get each of the values by looping through the string\t\t\t\t\t\t\t\tElse\t\t\t\t\t\t\t\t\t\tDim charPosition As Integer\t\t\t\t\t\t\t\t\t\tDim listName As String\t\t\t\t\t\t\t\t\t\tWhile fullString ""\t\t\t\t\t\t\t\t\t\t\t\tIf InStr(fullString, ",") = 0 Then\t\t\t\t\t\t\t\t\t\t\t\t\t\tcharPosition = fullString.Length\t\t\t\t\t\t\t\t\t\t\t\tElse\t\t\t\t\t\t\t\t\t\t\t\t\t\tcharPosition = fullString.IndexOf(",")\t\t\t\t\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\t\t\t\t\t\t\tlistName = Left(fullString, charPosition)\t\t\t\t\t\t\t\t\t\t\t\tfullString = fullString.Remove(0, charPosition)\t\t\t\t\t\t\t\t\t\t\t\tIf fullString "" Then\t\t\t\t\t\t\t\t\t\t\t\t\t\tfullString = fullString.Remove(0, 1)\t\t\t\t\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\t\t\t\t\t\t\t'now we have a name, make sure that name is selected\t\t\t\t\t\t\t\t\t\t\t\tDim item As ListItem = Me.AdditionalEmailList.Items.FindByValue(listName)\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf Not item Is Nothing Then\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.Selected = True\t\t\t\t\t\t\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\t\t\t\t\tEnd While\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\tEnd If'now to resave the selected values on the list boxDim entryString As String\t\t\t\t'get the selected values from the list box and concatenate them into one string\t\t\t\t'this is where I get the problem - selectedindex is 0\t\t\t\tIf Me.AdditionalEmailList.SelectedIndex 0 Then\t\t\t\t\t\tDim li As ListItem\t\t\t\t\t\tentryString = ""\t\t\t\t\t\tFor Each li In Me.AdditionalEmailList.Items\t\t\t\t\t\t\t\tIf li.Selected = True Then\t\t\t\t\t\t\t\t\t\tentryString += li.Value + ","\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\tNext\t\t\t\t\t\t'now remove the final comma\t\t\t\t\t\tDim finalChar As Integer = entryString.Length\t\t\t\t\t\tentryString = entryString.Remove(finalChar - 1, 1)\t\t\t\tEnd I
VIEWS ON THIS POST

137

Posted on:

Wednesday 2nd January 2013
View Replies!

Dropdownbox - Tooltips

I am trying to put a tool tip on a drop downbox.\tThe tooltip property works great in FireFox but not in I.E 6.\t
VIEWS ON THIS POST

110

Posted on:

Wednesday 2nd January 2013
View Replies!

Using Assembly src="" in .vb files

Hi ,Hopefully this is a quickie!A few of the web apps we've built are not compiled, but instead use the directive similar to:in the top of the ASPX page, which relates to a .vb file in the directory with a couple of classes in it.\t(more code at the bottom) Very handy for anyone making small frequent changes, however I was wondering if anyone knows how you could link two .vb files together before they're using in the aspx page.\tEg, we have default.aspx, MyLib.vb and DatabaseLib.vb. I can do in the top of default.aspx so I have the classes/functions of both available in default.aspx, but can I somehow make the functions from DatabaseLib.vb available in MyLib.vb by using a similar methodI guess I could create a new instance of the class(es) in DatabaseLib.vb and pass them into the MyLib classes, but I was hoping there might be something as simple asImports "Databaselib.vb"which I could put in the top of MyLib.vb.Wow, I hope that makes sense!\tBit of a long explanation, hopefully there's a shorter answer! Any help would be much appreciated
VIEWS ON THIS POST

129

Posted on:

Wednesday 2nd January 2013
View Replies!

Problem with adding a reference

.I created a WebService, and a proxy class.Now\tfor a windows application I had to add System.Web as a reference in order to consume the service.It worked, after several tries.Then I tried the same for a PocketPC type of application.I got the following error, eventhough System.Web.Services\twas originally added to the reference.The type 'System.Web.Services.Protocols.SoapHttpClientProtocol' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.\tI compared the solution with the windows application one. I noticed that System.Web.Services in Win App was loaded from the following location C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Services.dll.So I had to make the subsequent changes on that and on System.dll as well.But now, the\tPocketPC application won't work.Furthermore switching back the references to the original location: C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE, didn't fix the problem.Still getting this error: Deployment and/or registration failed with error: 0x8973190e. Error writing file '\Windows\NETCFV2.ppc.armv4.cab'. Error 0x80070070: There is not enough space on the disk.Any ideasThank you.
VIEWS ON THIS POST

157

Posted on:

Wednesday 2nd January 2013
View Replies!

View Email Spool

Is there any way to view the email spool of ASP.Net before it sends them via SMTP
VIEWS ON THIS POST

188

Posted on:

Wednesday 2nd January 2013
View Replies!

display a message in a new window on a button press

Hi ,I have created a web form to collected some information from user and then send the data via a System.Web.Mail.MailMessage on the submit of a button. The question i have is that i also want on the submit of the button to display a message in a new window telling the user some infomation. I am sure this is fairly simple thing todo but seem be gettting a bit stuck.
VIEWS ON THIS POST

154

Posted on:

Wednesday 2nd January 2013
View Replies!

Redirect Issues

I have a C# asp page that needs to record a hit and redirect, but the Javascript isn't executing and the redirect beats the JS execute.CODE\t\t\t\t\t\t\t\t\t\t\t\tRedirect\t\t\t\t\t\t\t\t
VIEWS ON THIS POST

354

Posted on:

Wednesday 2nd January 2013
View Replies!

ListBox Keypress Check .NET 2.0

Is there way to alter the default KeyPress behavior of a ListBox control, so that a continuous character entry will move through the list ( bad explanation.. what I mean is that, by default, when you press a key while focus is on the list items, the list will move to the first entry that starts with that key..What I want to do is continue typing and have the list move to the item that matches all the letters entered ).I have done this in Classic asp and JavaScript ( using\t onkeypress='evalKey()' as part of the
VIEWS ON THIS POST

178

Posted on:

Wednesday 2nd January 2013
View Replies!

hard carriage return

,I am trying to force a carriage return and line feed (vbcrlf) in to a string which will be used for the body part of an email.\tHowever, when I received the message; it appears to me that the body is one continuous long long long string.here is my snipet code CODE\tmailbody = "," & vbcrlf & vbcrlf & "You have selected the following items: " & vbcrlf\tselect case semicode\t\t\tcase "123"\t\t\t\tmailbody = mailbody & "activity 1" & vbcrlf\t\t\t\tmailbody = mailbody & "activity 2" & vbcrlf\t\t\t\tmailbody = mailbody & "activity 3" \t\t\t\t\t\tcase "12"\t\t\t\tmailbody = mailbody & "activity 1" & vbcrlf\t\t\t\tmailbody = mailbody & "activity 2" & vbcrlf\tend selectThe outcome of this was:,You have selected the following items:activity 1activity 2activity3The only way I can line them up in the message was to reside the window down then I can get my altimate result which is,You have selected the following items:activity1activity2activity3If you have any suggestion on why the vbcrlf did not execute (I can be wrong) please let me know or can show me how to line them up
VIEWS ON THIS POST

208

Posted on:

Wednesday 2nd January 2013
View Replies!

How do I force localhost to see a project?

I have been given custody of an existing asp.net application. The previous developer published from his localhost to the production server.\tI physically went onto his localhost and burned the project onto a cd.\tThen I put the project onto my localhost.I tried several times to work with this project.\tBut all of my attempts failed.\tI can give you a detailed account of my attempts.\tBut the bottom line is, I need to know how to get my VS installation and my IIS to interact with this project.\t
VIEWS ON THIS POST

179

Posted on:

Wednesday 2nd January 2013
View Replies!