| how to combine text and image in a button (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hello, I have a webform button control, when the button displays I would really like to have it display with text combined with a dropdown arrow. I know I can have them seperate as a button and image, but there is a small gap between them, I would really like them together inside the button. What I am trying to indicate is that when the button is clicked, a drop down list will appear, I am using i... |
|
| Accessing Session info from component (3 replies) |
| microsoft.public.dotnet.framework.aspnet |
| I have a data acess component that is used to access the database from several .net projects. I have now been asked to provide a web version of this application using ASP.NET I would like to use all the existing business logic components I have, but to do that I need to be able to read the database connection string required (could access several databases). Is it possible to get the session objec... |
|
| RePost : Dropdown DataText and DataValue (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi all, We have the application wherein we fill the dropdown control with DataTextFields and DataValueFields. For e.g. DataTextFields are : Employee A, Employee B, Employee Y, Employee Z. The corresponding DataValueFields are 101,102,104,105. Now we have to get DataTextField using DataValueField. This means using if we give value 101 then the item selected in the dropdown must be Employee A and if... |
|
| Add Session Variables from web control - HOW? (3 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi, How can I add, access session variables from within a custom web control ???? Thanks in advance, Meera |
|
| text box collection (4 replies) |
| microsoft.public.dotnet.framework.aspnet |
| What is the syntax to go through all the textboxes in a asp.net form? foreach(?????) Thanks in advance |
|
| Strange RegEx (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi All, I'm trying to match a file extension (1 dot and 2 4 Chars) by: Regex.IsMatch(txtFileExt.Text, "\.\w{2,4}") It matches 1 dot, but any number chars! Anything wrong with the syntax? Kind regards, Zhen |
|
| PrinterSettings.InstalledPrinters doesn't work in ASP.NET? (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi all, I'm trying to get the list of installed printers using PrinterSettings.InstalledPrinters. My code is exactly the same as the example code you can find all over the web, except that it sits on a WebUserControl instead of on a windows form: foreach(string s in PrinterSettings.InstalledPrinters) { ListItem li new ListItem("Print to " s, s); cboOutput.Items.Add(li); } I don't get any errors, i... |
|
| calling ASP.NET procedure with client-side script (8 replies) |
| microsoft.public.dotnet.framework.aspnet |
| I'm trying to implement a delete confirmation function on a button in a datagrid column. I'd like it to call a confirmDelete JavaScript function which then passes the delete command on to my ASP.NET record deletion code upon user confirmation. Is it possible to call the ASP.NET procedure from the client size script? Or is there another way that I should be doing this? I'm trying to avoid a postbac... |
|
| Debugging fails in VS.NET - Error binding to target method (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| I have a problem with my VS.NET debugging in ASP.NET. A collegue can debug the exact same project on his machine, so it must be down to my VS.NET environment!? The error I get is: "A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll Additional information: Error binding to target method." The error always happens on the same line of code, which is within the 'OnIni... |
|
| can't open MSWord from C# (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi I am trying to use Microsoft Word from a C# code behind file, but am being denied security access. I have added a project reference to the Word10 object library. I have a function private void makeWordDoc(){ Word.Application wd; wd new Word.Application(); wd.Visible true; //etc. } It fails to create an instance of the word application with System.UnauthorizedAccessException: Access is denied. I... |
|
| Adding Dynamic buttons click events (3 replies) |
| microsoft.public.dotnet.framework.aspnet |
| i am currently adding buttons to a table using Button btnTemp new Button(); btnTemp.Text "Book"; btnTemp.ID i.ToString("HH:mm"); btnTemp.Click new System.EventHandler(this.dynButton Click); void dynButton Click(object sender, EventArgs e){ //THE CODE// } Now upon my clicking the button the click event never gets triggered....help :P Ahmed |
|
| How to set editing TextBox's width in DataGrid (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| It is nice that DataGrid can make data cells editable by setting DataGrid.EditItemIndex. My question is how to make the editing textbox's width about the same width of the data cell? On my DataGrid, thee is a column very wide, but the editing textbox is only 1/3 of the cell' width in editing mode, which looks not good, but I could not find a way to make it as wide as the cell. Please shed some lig... |
|
| Determine Which Button is Pressed on UserControl (3 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Group, I have a page XYZ.aspx'. On this page is a UserControl 'UserControl1' that has 3 Buttons (Save, Next, Previous). What I need to do is on XYZ's Postback in the Page Load event, determine which button was pressed BEFORE the Event Handler for the Button is executed. Is it possible to determine which button was pressed, prior to the event handler running in code? L Johnson EXAMPLE: 1) Press "Sa... |
|
| Nothing vs DBNull (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| What is the difference between Nothing and System.DBNull.Value? I have an ExecuteScalar call that doesn't return a record. When I test for a value with DBNull it doesn't work: strS OleDbCommand.ExecuteScalar() If strS Is System.DBNull.Value Then .... End If In this case the 'IF' statement is not invoked, but if I replace 'System.DBNull.Value' with 'Nothing' it works. Can someone tell me why? |
|
| CurrentPageIndex / DataGrid Paging (3 replies) |
| microsoft.public.dotnet.framework.aspnet |
| I'm returning a DataSet from a search sproc and binding to a DataGrid. Let's say I search and I return 5 "pages" of results, and I navigate to the 4th page. If I search again (, and only get 3 pages or results. I get an error: Invalid CurrentPageIndex value. It must be 0 and the PageCount. So obviously, I need a way to reset my PageIndex before a new search. Anyone know how to do this? |
|
| Adding Custom HtmlControls to Toolbox (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| I'm having a problem with a custom Server Control that inherits HtmlInputControl (which inherits HtmlControl). This particular control duplicates the HtmlInputText Control, and it works beautifully, except for one thing: When I try to add it to my Toolbox, by opening up the "Customize" dialog and browsing to the DLL, it doesn't show up. The other control in that assembly does. It inherits Control.... |
|
| Problem writing to WebControls.TextBox when TextMode='Password' (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| I need to provide an administrative interface, that will enable an administrator to modify a users profile, including resetting a password. I have a aspx page that loads the users profiles (ie user name, login ID, email address, roles and password) from the database and populates several textboxes on the form. This works fine, except for the password box, which does not display anything. If I remo... |
|
| How do you drop a row from a DataSet? (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi, I want to be able to iterate thought the rows of a DataGrid and remove a particular row when a condition is met. I am experimenting with the 'Remove' method, however the following bit of code fails on the last line with the error message "Collection was modified; enumeration operation may not execute". Note, I don't want to update the database with the change, however my code will reuse the Da... |
|
| Newbie question on format a datetime field (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi, How do I format a datetime field? Say I have: %# DataBinder.Eval(Container.DataItem, "ordate") % inside an ItemTemplate. Thanks in Advance |
|
| GetHostByAddress doesn't work sometimes (4 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi, I'm using Dns.GetHostByAddress(Request.UserHostAddress).HostName in my app to check the user's machinename. it works fine for our intranet / ActiveDirectory users. Except for one or two users! And i don't know why. They're getting an error, "System.Net.Sockets... The requested name is valid & was found in the database but it does not have the correct associated data being resolved" Anyone have... |
|
| Problem Building Dynamic TemplateColumn (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| I am trying to build a series of dynamic TemplateColumn in an ASP.NET codebehind. Nothing is in the .aspx aside from the asp:datagrid declaration. This is because the same grid is used for multiple types of datatables with different names/types/columncounts. I think I am close with the following code but I am getting a compile time error. Can anyone say how I should create these objects strictly b... |
|
| How do I find out if PostBack is result of DataGrid pager pressed? (3 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hello, I need to know in Page Load event if result of post back is caused by pressing on one of pager button in DataGrid inside the page. How do I do that? Thanks, G |
|
| ASynchronous Functions (2 replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hello, I am putting together a utility class for my ASP.NET web site and one of the methods is called "SendEmail" which, you guessed it, sends an e mail. But since sending an e mail could take awhile, I decided to use ASynchronous (multi threaded) programming to let the site run "faster" while sending the e mail in the background. But I am having difficulty getting this to work. I found an MSDN ar... |
|
| Try..............Catch (4 replies) |
| microsoft.public.dotnet.framework.aspnet |
| The following code within the Page Load sub routine retrieves records from a backend. These records will then be used in another SQL query to retrieve & display the final output: script language "VB" runat "server" Sub Page Load(obj As Object,ea As EventArgs) Try strSQL1 "SELECT ern.ErnID,ern.ErnCode,ern.ErnName FROM ERNMST AS ern JOIN..........." objDapter1 New SQLDataAdapter(strSQL1,objConn) obj... |
|
| ViewState Problem (3 replies) |
| microsoft.public.dotnet.framework.aspnet |
| We have a class that inherits from System.Web.UI.Page. This class has is used for a reporting system that we have developed. It has a property called Table, this table is similar to an ASP Table (System.Web.UI.WebControls.Table), which represents the information that the report displays. On difference between this Table class and the ASP Table is that in the Rows collection each row has several ad... |
|