Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

PJWindsor

@PJWindsor
About
Posts
12
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • AJAX Problem "There was an error in callback"
    P PJWindsor

    I think i am getting an exception but the code i wont to write into the event log isnt working. Its a permission thing, i've created an event source in the registry but it still isnt writing too it. Im going to try to track down the users ASP is running under on my server and then all that user write permissions. Thanks for the help, its always nice to go back to basics :)

    ASP.NET csharp help asp-net dotnet visual-studio

  • AJAX Problem "There was an error in callback"
    P PJWindsor

    Cheers ill check the logs tomorrow, when im in work again and update. Phil

    ASP.NET csharp help asp-net dotnet visual-studio

  • how I can get id's of checked checkboxes, which are runtime added?
    P PJWindsor

    What is the definition for table1 variable? Is it public? as from the code it looks like it could be used as a local variable. You could set a break point on the line starting "For Each ctl As Control In table1.Controls" and see if it says that the table contains any controls If it does then then next line to look at would be the runtime values of the "If CType(ctl, CheckBox).Checked = True Then" line does it say the value is checked? how does that corrospone to the database values? Any chance you could post the code as a code block? the entire page and behind code? Phil

    ASP.NET help database sysadmin data-structures question

  • Kind of new to Web Development with ASP.Net and was wondering...
    P PJWindsor

    By the sounds of it you need to check the isPostBack property of the Page object. This is used to tell if its the first time the page is loaded or its a postback. If its the first time you would want to do things like your dynamic setup of the form i.e. fill in items in a dropdown box or create dynamic controls but you wouldnt want to do this everytime the page loads, otherwise you end up added the same information twice to the page. Look at the Asp.net Page Life Cycle from that you will find that the page load event will run when before the onclick event of the button. See here http://msdn.microsoft.com/en-us/library/ms178472.aspx[^] If you want the button to redirect to another page then you can use Response.redirect("Somepage.aspx") or Server.Transfer("Somepage.asx") Each has its own merits i would depend on what you are trying to achive. Hope that helps Phil

    ASP.NET asp-net csharp winforms help question

  • AJAX Problem "There was an error in callback"
    P PJWindsor

    Hi all, Im having a problem where if i run a ajax based website on my developement machine using the Visual studio intergrated websever my ajax control works as expected all the ajax callback work. If i publish the website to my live server(settings below) all the other controls work but ajax functionality gives a error message "There was an error in callback" then what looks like a long string of random chars probably a hash. Has anyone had anything similar? is there anything specifice i need to do to my IIS setup to get AJAX working propertly? Or would this be an error in my code, although if it where i dont see how it would work from Visual studio. IIS Server Setup On the ASP.NET tab of the site properties the site is set to, version 2.0.50727 and the website has its own application Pool. Server is setup using Windows 2003 version 5.2.3790 SP2 Build 3790 and has .NET Framework 3.5 SP1 installed. Thanks in advance Phil

    ASP.NET csharp help asp-net dotnet visual-studio

  • How to open a word doc in firefox in a write mode using asp.net
    P PJWindsor

    Hi Done abit of testing and can replicate this. Have you though of using something firefox addins afew that may suit your needs include http://www.addictivetips.com/internet-tips/openedit-any-document-or-image-online-with-openit-add-on/[^] This allows you to open the document in online document programs i.e. google or maybe a better option would be [IEView] which allows you to open the existing html document or a link in IE, so therefore persumable it would open in writable mode. Phil

    ASP.NET help csharp asp-net performance tutorial

  • ASP.net Ajax Server Control
    P PJWindsor

    Please ignore this now i've worked it out, although if anyone has a better way let me know. I've used the context to pass the control name through.

    string sref = Page.ClientScript.GetCallbackEventReference("context", "arg", "display","context","display_Error", true);

            string Callback = "function GetData(arg, context){" + sref + ";}";
    
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CallBack", Callback, true);
    

    this means that in my javascript i've got calls like

    GetData(Value,"Lookup1");

    Cheers Phil

    ASP.NET csharp javascript html asp-net sysadmin

  • Need to capture data of currently displayed webpage
    P PJWindsor

    It is possible to get the HTML From a WebBrowser Control see below code sorry if you dont know C# I just put a textbox on the page to enter the url, a button to navigate to the url(btnLoadWebsite_Click handles this button) and a button to get the HTML from the currently displayed page (btnGetHTML_Click handles this).

    private void btnLoadWebsite_Click(object sender, EventArgs e)
    {
    try
    {
    Uri oURL = new Uri(txtURL.Text); //Get the Url from the text box must be format http://www.google.com
    wbMain.Navigate(oURL); //Navigate to the Url
    }

            catch (Exception err)
            {
                MessageBox.Show(err.ToString());
            }
        }
    
    
        private void btnGetHtml\_Click(object sender, EventArgs e)
        {
            MessageBox.Show(wbMain.DocumentText); //Display the HTML
        }
    

    The important bit is wbMain.DocumentText. wbMain is the WebBrowser Control and DocumentText is the property that holds the current html page text. Phil

    ASP.NET csharp perl html asp-net database

  • Need to capture data of currently displayed webpage
    P PJWindsor

    If you want it learn its Called Platform Invoke in .NET its all about using the existing Windows dll's from .NET here is a good artical to get started its shows you how to use some of the functions in the User32.dll [PInoke on CodeProject] this website list alot of the windows functions with code to automate them http://www.pinvoke.net/[www.pinvoke.net] Phil

    ASP.NET csharp perl html asp-net database

  • Need to capture data of currently displayed webpage
    P PJWindsor

    How about if you use the WebBrowser Control on a windows form? Im not sure but it think you should beable to browse to the page you want and then write some code to get the HTML of the current page on the WebBrowser control. If that doesnt work then you can look at using Automating IE directly i forget the dll name its something like SHDocVW and this contains the Interfaces for automating IE Directly. From here you can get the current document.

    ASP.NET csharp perl html asp-net database

  • Need to capture data of currently displayed webpage
    P PJWindsor

    Hi, have you tried Fiddler its a HTTP Debugging tool and logs whats going on as your are browsing, you can see html, js files downloaded and alot more, might help. If that doesnt do the trick then look at the WebRequest object this can be used to get the HTTP response, as you said there is a log screen it maybe harder, but you can do your own POST by changing the username, password, and wordart answer into a Byte array and then sending this with your request to whatever page the form points too. try here http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^] Phil

    ASP.NET csharp perl html asp-net database

  • ASP.net Ajax Server Control
    P PJWindsor

    Hi all, I have a composite ASP.NET server control includes a HTML button that shows a div which allows searching capacities, the Search capacities are implimented using AJAX, im inheriting from WebControl and impliementing INamingContainer and ICallbackEventHandler. The Control that works fine if you have just one control on the an ASP.NET page. If you add further controls onto the page the first control still works fully but all contols after that allow the show/hide behaviour but the Ajax bits dont work. There are no errors, the data area just stays blank. I think i have a problem with the way im registering the callback function. this is the code im using which is in the overridded OnPreRender Method of the Server Control.

            string sref = Page.ClientScript.GetCallbackEventReference(this, "arg", "display","", true);
    
            string Callback = "function GetData(arg, context){" + sref + ";}";
    
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CallBack", Callback, true);
    

    This outputs the following section of html

    <script type="text/javascript">
    //<![CDATA[
    function GetData(arg, context){WebForm_DoCallback('LookupBox23123',arg,display,"",null,true);}//]]>
    </script>

    As you can see the first parameter of the callback contains the ID of the first control added (I know the ID is abit weird). I Think that is why the first control continues to work with Ajax but the rest don't. Is there a way i can pass in the control name to the callback method so i can use multiple controls, or can i amend the script Reference to allow this functionality. Many thanks Phil

    ASP.NET csharp javascript html asp-net sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups