Jump to content
Xtreme .Net Talk

farshad

Avatar/Signature
  • Posts

    114
  • Joined

  • Last visited

Everything posted by farshad

  1. farshad

    listbox

    Hi, In my asp.net program I have a listbox which is populated I would like to then select an item from the listbox and present that item in a textbox. I tried setting the autopostback to true (don't know if this is a right thing to do) But can not get the selected text in the listbox??? Thanks
  2. farshad

    xml

    <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ServerName" value="svr07" /> <add key="DatabaseName" value="TradarBe" /> </appSettings> </configuration>
  3. Hi, I am trying to create a setup for my vb.net application The application is referencing msxml3.dll While I try to build the setup, in the task list it says: 'msxml.dll' should be excluded because its source file 'C:\WINDOWS\System32\msxml.dll' is under Windows System File Protection. When I try to delete this dll from the application folder, it does not allow it (i.e. no option to remove this file) Thanks
  4. Hi, My question is to do with the datatype? In the constructor of a class, I am initializing the variables which are of various types (i.e: string, double, decimal, etc...) These are initialized such as "" for string and 0 for int or 0 for double, etc... Let's say that during a call to the DB, only one of them gets set (i.e: the string variable = "hello") but the other variables are not set. So obviously the other variables are set to 0 of they are decimal for example. The question is that how is it possible to find out that the other variables that were not set?. I.e: how can I return null for the other variables? Hope this is clear Thanks
  5. Hi, In my asp.net form, there is a hyperlink which is as below <A href=Resume onclick="OpenFile()">Resume</A> in the header section I have written the following so that if the password is correct then the file gets loaded up for the user to see. But this function does not work Thanks <script language="javascript"> function OpenFile() { var password = prompt('Please eneter password', ' '); if ( (password==' ') || (password==null) ) { password=""; } else if (password = 'f') { window.open('Files\test.doc'); } else { return; } } </script> Thanks guys
  6. farshad

    .ascx

    I am getting the following error and can not resolve the problem. The Error is: 'HtmlTable' cannot have children of type 'datagrid.ascx' I am basically trying to load an .ascx into a cell of a table Thanks
  7. farshad

    datagrid

    I am following a sample on the internet about a hierachical datagrid. For some reason my sample creates all the data as expanded and not collapsed as it shows on this link. Do you know why? http://www.dotnetjunkies.com/Tutorial/841522C9-FFBD-4C57-BD48-F62B55057FF3.dcik Thanks
  8. Hi, I am using a datagrid which has a plus sign next to each record so that you can drill down another level. How is it possible to drill down one record (i.e: expand) and at the same time have another record expanded too? Currently I believe you are allowed to have only one record at a time to be expanded. Is this right? And are there any examples which shows the datagrids in asp.net to drill down several levels rather than once? Thanks guys
  9. farshad

    timer

    Hi all, There is a timer control on my webform which is in asp.net It checks every 1000 milliseconds for the time to be 9.15 At this time it does the required processes (i.e. GetData()) Do u know why sometimes the GetData() does not get triggered? even at 9.15? Here is the code: Private Sub tmr_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmr.Tick StartTimer() End Sub Private Sub StartTimer() Dim intDay As Integer Dim intSysHour As Integer Dim intSysMin As Integer Dim intSetHour As Integer Dim intSetMin As Integer intSysHour = Now.Hour.ToString intSysMin = Now.Minute.ToString intSetHour = hsbHour.Value intSetMin = hsbMin.Value intDay = DateTime.Now.DayOfWeek If Not (intDay = 6 Or intDay = 7) Then '6 and 7 represent saturday and sunday respectively... If (intSysHour = intSetHour And intSysMin = intSetMin) Then tmr.Enabled = False 'Once the process has started, turn off the timer... GetData() End If End If End Sub
  10. farshad

    tree

    gh
  11. farshad

    tree

    Hi everyone, I am facing a lot of problems downloading the ie webcontrols for asp.net I do follow the link in msdn but it downloads the webcontrol.exe and not the .msi therefore the installation is not successful. Can someone let me know what to do please? thanks
  12. farshad

    start

    Hi, Why is it that when running the code below, the new instance of explorer does not open and yet there is no error. P.S. the code is in Asp.net Thanks Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click System.Diagnostics.Process.Start("IExplore.exe") End Sub
  13. Hi, There are several windows apps, services, sql jobs that I have created. These run automatically each day at different times. I have created an asp.net intranet for the company. I would like to have a page which will allow the above jobs to run if they fail. How can I start these jobs from a .aspx page. For example I would like to click a button or a hyperlink which will then start a job which is written in windows in vb.net or c# or a job which is a sql server job. Hope this is clear. Thanks guys...
  14. farshad

    file

    How is this done? The web server is currenly my pc. Thanks
  15. farshad

    file

    Hi, I would like to save on the network (Neither the server nor the client but another machine on the network) Thanks
  16. farshad

    timer

    How is it possible to run a procedure/job say at 9.00 am every morning. I believe tere is no timer control in asp.net as it is in win app. Thanks
  17. farshad

    security

    What security measures should I follow so that I can save a file (i.e. hello.csv) into a folder on the network i.e. "G:\networkfolder\test\" ? Thanks
  18. farshad

    file

    Hi, In my win application I use the following code to save the downloaded data into the necessary format sw = File.CreateText(strPath & ".csv") please not ethat .csv can be .xml instead This works fine but what should I do in web (asp.net)? I can not use the above line as it complains about the network path where the file should be installed. If the best way is to get a dialog box to save as then how is it done please? thanks
  19. farshad

    debugger

    Hi, All of a sudden most of the time, my win .net application does not debug when it gets to the middle of the program. The message is: There is no source code available for the current location I have looked on Microsoft site and it says: Your project does not contain source code for the code you are trying to view. The usual cause is double-clicking a module that does not have source in the Call Stack or Threads Window. You can continue to debug, but cannot use the source window to set breakpoints and perform other actions at this location. If you need to set a breakpoint, use the Disassembly Window instead. It says that the source code is not there but I have not changed anything and do not understand why this is keep happening all of a sudden. Thanks
  20. Hi, Can someone send me a simple example to invert a math matrix with a little explanatiojn please? I have this but do not really understand it. Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4); myMatrix.Invert(); Thanks
  21. farshad

    xml

    Hi, Using vb.net in my application I can use the following code to write a file as .xml and save it on the network Dim sw As StreamWriter Dim strPath = "G:\folder1\test" sw = File.CreateText(strPath & ".XML") 'Create the XML file... sw.Write("testdata") Why can I not do the same task in ASP.NET? Thanks
  22. my dataset is not being populated from a database. It is being populated from a .xml file I can place the data from .xmml into a dataset but still can not transfer the dataset to a table in database. Is there a way to just transfer the whole xml data into the table in database? thanks
  23. Can someone please point me out to where I can get good examples on how to transfer the data from .xml file into a table in database. Thanks
  24. farshad

    .net

    Hello, When I run a simple VBA code to retrieve data from a site, it works fine and data is returned. But when I do the same in vb.net, no data is returned. Do you see why? Thanks -------------VBA code-------------- Private Sub CommandButton1_Click() Dim s As String Dim myDataObject As New DataObject Dim doc As Object Set doc = CreateObject("msxml2.ServerXMLHTTP") doc.Open "POST", "https://www.mark-it.com/export.php", False doc.setrequestheader "Content-Type", "application/x-www-form-urlencoded" doc.setrequestheader "User-Agent", "curl" s = "user=hello" s = s & "&password=pass" s = s & "&version=" & "2" s = s & "&format=" & "xml" s = s & "&report=RedEntity" doc.send (s) Dim x As String x = doc.responsetext 'responsetext returns the xml data... End Sub ----------.Net code---------------- Private Sub GetData() Dim s As String Dim myDataObject As New DataObject Dim doc As Object doc = CreateObject("msxml2.ServerXMLHTTP") doc.open("POST", "https://www.mark-it.com/export.php", False) doc.setrequestheader("Content-Type", "application/x-www-form-urlencoded") doc.setrequestheader("User-Agent", "curl") s = "user=hellp" s += "&password=pass" s += "&version=" & "2" s += "&format=" & "xml" s += "&report=RedEntity" doc.send(s) Dim x As String x = doc.responsetext 'responsetext DOES NOT return the xml data...?????????????????? End Sub
  25. Hi, Can u convert this VBA code to vb.net please? Thanks Dim clipboard As DataObject clipboard = New DataObject clipboard.SetText doc.responsetext clipboard.PutInClipBoard 'And here I would like to see what is on the clipboard...
×
×
  • Create New...