Topics
-
-
- Administrators
- 3 replies
- 1.6k views
Hi all I am looking for code that will prevent the user from clicking on a particular button more than once. I got some C# code that is suppose to work. I converted this code into vb.net: Dim sb As New System.Text.StringBuilder sb.Append("if (typeof(Page_ClientValidate) == 'function') { ") sb.Append("if (Page_ClientValidate() == false) { return false; }} ") sb.Append("this.value = 'Please wait...';") sb.Append("this.disabled = true;") sb.Append(ClientScript.GetPostBackEventReference(Button1)) sb.Append(";") Button1.Attributes.Add("onclick", sb.ToString()) The problem that I am getting is: "Value of type System.Web.UI.WebControl.Button cannot be converted in…
Last reply by mike55, -
-
-
- Administrators
- 2 replies
- 2.1k views
Hi, I'm trying to create a MasterPage with ContentPlaceHolders in it. I have no problem adding the ContentPlaceHolders to the MasterPage. However I can't seem to put the ContentPlaceHolder anywhere I wish to on the page or change their size. I wish to have two ContentPlaceHolders on the page, one is for a menu that changes depending on which page the user is viewing, and one where I'll add information on aspx pages. I tried creating a Table but VS doesn't allow me to put the ContentPlaceHolder within it so my guess is that's not a valid thing to do :-\ I also tried with <div> and then I can say that I want it to be aligned "center" (although VS then…
Last reply by slimshady, -
-
-
- Administrators
- 1 reply
- 1k views
Hi Guys, In asp.net, lets say i have the following url URL = "http://localhost/RuleDatabaseAPI/getTechnologyClassName.aspx?group=Assembly&subgroup=Fiducial Analysis" If i issue the following command Request.QueryString["group"] I get "Assembly" If i issue the following command Request.QueryString I get the whole url back What if i have to get all the list of parameters Meaning i want to know list of parameters being sent If i take the above url as example, is the any command which return to me "group" and "subgroup" since that are the only two parameters in this URL Thank you very much for any help..
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 3 replies
- 2.2k views
Hello, I've drawn a picture using the picturebox_paint event. ex. e.Graphics.FillRectangle(mybrush, x * 16, y * 16, 16, 16) Later I want to save the picture in the picturebox. But the picturebox.image is Nothing. BackgroundImage is also Nothing. How do you save the content in the picturebox to a bmp file if you haven't specifically added an image through picturebox.Image property? Best Wishes, Farek
Last reply by Farek, -
-
- 0 replies
- 830 views
Hi Group, In my application there is a very common functionality, where two list box and present and items are moved between them on button clicks when selected, This I am doing client side, Client side code is like this -> function assignInspector(listboxAllFieldEngineers,listBoxAssignedFieldEngineers) { i=0; while(i<listboxAllFieldEngineers.length) { if(listboxAllFieldEngineers.options.selected) { var optn = document.createElement("OPTION"); optn.text = listboxAllFieldEngineers.options.value; optn.value = listboxAllFieldEngineers.options.value; listBoxAssignedFieldEngineers.options.add(optn); listbox…
Last reply by anup_daware, -
-
- Leaders
- 5 replies
- 1.4k views
hi, how can i brows a html file to my win application? (c#.net) 1. i have a javascript file (js) and i want run it in my win app. (as a html file run it) or 2. i have a html page in same directory of my exe app and i want brows it in my form. or 3. is there any class that set to a html source string and run it? thanks
Last reply by snarfblam, -
-
-
- Administrators
- 3 replies
- 1.2k views
It is my understanding that the below code is the best way to determine a users network name in an ASP.Net page. However when I run it I get an empty string. Can someone help? Imports System.Security Imports System.Security.Principal.WindowsPrincipal Dim logon_str As String = HttpContext.Current.User.Identity.Name Dim str_int As Integer str_int = logon_str.IndexOf("\")'for some reason it this forum is dropping the "back slash". It is there in the real code logon_name = HttpContext.Current.User.Identity.Name.Substring(str_int + 1)
Last reply by kcwallace, -
-
- 0 replies
- 1.1k views
I have an aspx page that is supposed to link to an "index.aspx" page in each of several folders. I have been able to figure out how to list the names in a datalist but I would like to list them as hyperlinks in a datagrid (/foldername/index.aspx) Here is the code for the datalist: Dim Directories As New IO.DirectoryInfo(Server.MapPath("")) Dim Directory As IO.DirectoryInfo For Each Directory In Directories.GetDirectories ListBox1.Items.Add(Directory.Name) Next If I could get some tips for the code, I would really appreciate it. I know how to hyperlink to files, I am just having problems with linking to the file within a folder. THanks
Last reply by lorena, -
Loop Error
by ehelin-
- *Experts*
- Leaders
- 3 replies
- 769 views
Hi: I have a wierd error that I can't seem to find out why its happening. Problem: I am interating through a collection of combo box items. Periodically, I get the following error: "Collection was modified; enumeration operation may not execute." The wierd part is that I am not modifying the list (i.e. adding, removing, etc.)...or am I? The code in question: Dim Ctr as Integer = 0 For Each ForLpPharm As Pharmacy In cmboDefaultPharmacy.Items If ForLpPharm.PharDBId = pMaData.PharmDbId Then cmboDefaultPharmacy.SelectedIndex = Ctr PharmFound = True Exit For End If Ctr += 1 'Error happens here...before second interation …
Last reply by ehelin, -
-
-
- Administrators
- 1 reply
- 933 views
Hi, :p Is it possible to send information (e.g string) from one page to a control of another page without using Session States or other server-based state management techniques? i.e no postback Right now, the label of the 2nd page has to display the 1st page's radio button's text when it is clicked.
Last reply by PlausiblyDamp, -
-
- 1 reply
- 792 views
Hi Since the edit windows for posts on most forums are annoyingly small, I want to write something like a BBCode Editor, which shows the result in realtime. (A rich text box which previews the post & bbcode from a normal textbox) For example I want to format the text between the tags text, but I could only think two way to accomplish my idea. Either I set the Formating paste the text into the control until the format changes, then change the formating, paste the next part and so on, or write the formating code which is needed by the richtext box, which seems not to be an easy task. Is there any other way to do this?
Last reply by Diesel, -
-
- Leaders
- 3 replies
- 963 views
Is there also a function in C# like this PHP function: http://www.php.net/ord The get the charachter with a ASCII value.
Last reply by MrLucky, -
-
- 2 replies
- 668 views
Hello I want to pass a parameter to this querry determining how many records to select parameter to replace the (Top 10 ) Select Top 10 * from customers order by id any idea will be appreciated Thanks
Last reply by bary40, -
- 0 replies
- 2k views
Hi, I'm creating a 3D landscape using a heightmap. The landscape is working, but I'm trying to create normals for the vertexes. Could anyone verify that I'm doing this correctly? Or maybe point me in the right direction :) Regards, Jørn for( int y = 0; y < _Height; y++ ) { for( int x = 0; x < _Width; x++ ) { try { Vector3 p0 = _Vertexes[x + y * _Width].Position; Vector3 p1 = _Vertexes[-1 + x + y * _Width].Position - p0; Vector3 p2 = _Vertexes[-_Width + x + y * _Width].Position - p0; Vector3 p3 = _Vertexes[1 + ( -_Width ) + x + y * _Width].Position - p0; …
Last reply by jorn79, -
- 1 reply
- 1k views
In visual basic.net 2003 how do you clear the system clipboard? All the options I have is the getdataobject and setdataobject. Any help offered is greatly appreciated.
Last reply by jo0ls, -
- 1 reply
- 759 views
I'm looking for the fastest way to run a query that gets two different values from an Oracle table, and subtracts one from the other. The first is determined by querying a field that identifies one type of data, and the second by querying the same field for another type of data. The two individual queries are: SELECT CDATE, TNAME, AS_REP FROM CARD_TABLE WHERE CDATE <= '01-Dec-2001' AND CDATE >= '01-Nov-2001' AND TNAME = 'TRSTXN' and SELECT CDATE, TNAME, AS_REP FROM CARD_TABLE WHERE CDATE <= '01-Dec-2001' AND CDATE >= '01-Nov-2001' AND TNAME = 'TRS554N' These two queries will each return two rows, as there is one value on the first of ea…
Last reply by Puiu, -
-
- Administrators
- 2 replies
- 1.7k views
Hi all I am trying to select between two dates in a sql table. This is the following statement that I am using: sqlCmd.CommandText = "SELECT Count(ID) FROM SentMessages WHERE Org_ID = '" & orgID _ & "' AND (Msg_Type = 'SMS' OR Msg_Type = 'MO' OR Msg_Type = 'WAP') AND (MessageDate BETWEEN '" & Convert.todatetime(fromDate) & "' AND '" & convert.todatetime(toDate) & "')" where todate and fromdate are both strings. I am getting the error message cannot convert from a char to a datetime. Can anyone tell me how this should be done? Mike55.
Last reply by Puiu, -
-
-
- Administrators
- 9 replies
- 1.7k views
Uncompress a gzipped byte array Is it possible to uncompress a gzipped byte array?
Last reply by MrLucky, -
-
-
- Administrators
- 2 replies
- 851 views
This is so basic I'm embarassed to ask it. I'm learning ASP.NET and my book (Introducing...Dino Exposito, a Microsoft publication) is written for C#. I can't seem to get IDE to open for ASP for C#! It always opens with a skeleton program for VB despite my settings in the "Import and Export Settings." What am I doing wrong? I appreciate any help.
Last reply by john07801, -
-
- 0 replies
- 651 views
I got this component I created a long time ago. I found it in some backup I made over a year ago so here's a sample of what the control really does It�s written in c#. The control should make it possible to create gantt chart of somekind http://www.v-software.com/images/stories/ScheduleBox/ScheduleBox.png I added a sample in the attachment I would like to have some response on what features I could add Or if you find bugs please report them to me. I plan to release this commercial someday but I realize that some work needs to be dun first so please I you have feature request let me know Thanks. Test.zip
Last reply by Engine252,
-
Who's Online 0 Members, 0 Anonymous, 53 Guests (See full list)
- There are no registered users currently online