Hi, thank you! I already did try the javascript method, and it works fine in IE, but in Mozilla Firefox the textbox gets the focus but the windows is not scrolling down to the textbox.... maybe I should also use window.scrollto or something like that..... The first solution I haven't tried yet.... will do so.
lustuyck
Posts
-
Scroll control into view after postback -
Scroll control into view after postbackHi, I use linkbuttons on my page, and use the click events to do some stuff and render the page depending on the clicked linkbutton, for example, showing an input box. How can I make sure that after I clicked the link button, the specified input box scrolls into view? Normally I would add something like #id to the url, but a linkbutton does not use an url. Suggestions? Thx!
-
UniqueID, ClientIDHi, I'm working on a weblog control @ http://www.coders-lab.net/index.aspx?sm=myweblog[^] It works with a template, and in order to retrieve values on postback, I use the client id of the control. In case of an ASP:TextBox, this is UniqueID; but in case of the FreeTextBoxControl for example, it's ClientID. What is the difference between UniqueID and ClientID? Why do I have to use UniqueID of ASP:TextBox to get the client id, and ClientID to get the client id of the FreeTextBoxControl...?
-
Templated control questionI created a templated control exactly as described on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomizingcontrolswithtemplates.asp[^] The result for the moment is http://www.coders-lab.net/index.aspx?sm=myweblog[^] (only show/hide comments works). All it does is using a template to generate the layout and fill in data from the database. Template looks like (simplified, but you'll get the idea):
<CC:WebLog runat="server">
<TopicRepeaterTemplate>
<h1><% #Container.Title %></h1>
<h3><% #Container.Author %></h3>
<a href="<% #Container.PostCommentHyperLink%>">Post comment</a>
</TopicRepeaterTemplate><CommentRepeaterTemplate>
<h1><% #Container.Title%></h1>
<CommentRepeaterTemplate></CC:WebLog>
Then I started with the 'post comment' link implementation, and that's where I'm stuck. I want to create another template that determines the layout of the post comment part:
< PostCommentTemplate>
<RR:FreeTextBoxControl runat="server" id="CommentEditor">
<a href="<% #Container.InsertCommentHyperLink%>">Post comment</a>
</PostCommentTemplate>I want the user to be able to add an editor control in the template with id="CommentEditor" (for example the FreeTextBoxControl). But I don't know how to generate this in my WebLog control, and after clicking on the 'Post comment' hyperlink I need to retrieve that control again in order to get the value of it. So replacing <%#%> tags in the template works; but now I need to find out how I can place custom controls on the template, and use them in my WebLog control... Can someone point out how this can be done? Thanks, kind regards, Ludwig
-
Cyclic dependenciesHi, imagine a Folder object, that contains a list of File objects. Each File object has a Folder parent. So we have a cyclic dependency here. When I try to return such structure with a web service, I get the following error: System.Web.Services.Protocols.SoapException: Server was unable to process request. --> There was an error generating the XML document. --> A circular reference was detected while serializing an object of type Folder. I've read that XmlSerializer can't handle cyclic dependencies. Does this mean that I cannot use web services to return such a structure, or is it a bug and will it be possible in 2.0 for example? Is there some kind of workaround for now? Thanks in advance!
-
Control propertiesHi, I have a C# application, with a property "Windowhandler" of type IntPtr. This is a window handler of a (managed) control contained by another .NET application that is running. Now I need to retrieve that control's name and type. Does anyone can point me in the right direction on how this can be done? Thanks, Kind regards, Ludwig
-
\\computer\sharedOkay, thanks for the answer, I got it working! Kind regards, Ludwig
-
\\computer\sharedThanks, but this does only support drilling to a folder, not to a UNC...
-
\\computer\sharedHi, I'm developing kind of an explorer-like application, that lists local drives/folders and also network drives, as explorer does. When the user enters a path like C:\folder1\folder2, I can browse the tree to select that tree. However, when the user enters something like \\computername, or \\computername\shared, then how should I browse the tree to select that one? I can't enumerate all domains to check where that computername can be found (takes hours), so what is the correct approch? Can I, for example, check to which domain a computername belongs, or something like that? Kind regards, Ludwig
-
Checking if control movedHello, I developed a user control, that creates a little form (X) and positions that form relative to the control. The control is placed on a windows form to test it. The idea is that when the windows main form is moved, the control is also moved (anchoring), but form X should move along. So what I do is catch the LocationChanged event of the ParentForm of the control, and in that event I reposition form X. This works ok. However, now I'm in the situation that the control is placed on something that has no ParentForm. Question: how can I detect if a control's screen coordinates are changing? So the position of the control inside its parent remains the same, but the screen coordinates change because the parent is moved. Can I detect such movement?
-
Simple databinding issueHi, thanks for the answer. What I do now as a 'workaround', is wait until an item is added to the collection the first time; and when that happens I add the databindings (only once). It works now, but I don't know if this is common practice. Are there better ways to do something like this? Kind regard, Ludwig
-
Simple databinding issueHi, I have a ClassA (extends Component) with some properties. I have a ClassB (extends CollectionBase) that implements collection of ClassA objects. In my main app, I use a ClassB collection, add some ClassA objects to it, and databind a property X of ClassA to a textbox: textBox.DataBindings.Add("Text", ClassBCcollection, "PropertyX"); This works well, changes in the textbox are reflected in the collection. EXCEPT when at startup the ClassB collection is empty, then databinding does not work. So; databinding works when databindings are set after collection is filled with items; databinding does not work when databindings are set when collection is empty. Do I miss something...? Thanks!
-
Strange remoting issueAlready changed that.
-
Strange remoting issueHi, After two days I found out why it didn't work. Originally my config file contained: I changed it into: and all of a sudden the methods was also called asynchronously. I still don't know why, but it works now. For your information, I wanted to use asynchronous calls because my remote method lasted 10 minutes to complete. I ran into another issue however, and I want to mention it here because it took me a while to find a solution. After 2 minutes or so, the thread was aborted on the server and my callback method was never called (the method was executed correctly though). So it worked, but I never got callback because the server thread ended. I solved this by dynamically increasing the script timeout that IIS uses: System.Web.HttpContext.Current.Server.ScriptTimeout = 1800; Now it works... but it was hard to find the solution :((
-
Strange remoting issueI have a client form that uses a remote object 'RemoteDataManager ' as follows: RemoteDataManager r = new RemoteDataManager(); r.Test(); This works correctly, Test is executed like it should. However, this method takes a while to complete, so I'd like to make it a asynchronous call. So I tried: RemoteDataManager r = new RemoteDataManager(); AsyncCallback RemoteCallback = new AsyncCallback(OurRemoteAsyncCallBack); TestDelegate RemoteDel = new TestDelegate(r.Test); IAsyncResult iar = RemoteDel.BeginInvoke(RemoteCallback, null); This runs, but the Test method is never executed! I don't know where to look for... does anyone have a clue? Kind regards, Ludwig
-
Intercept incoming htmlHi, I'm looking for a starting point here. I want to 'intercept' incoming HTML on the client, before it's handled by the browser. Is this possible? Kind regards :-D, Ludwig
-
Crystal Reports questionHi, I'm working on a remoting project with Visual Studio .NET. What I want is, to build the ReportDocument on the server (so the dataset is filled, attached to the ReportDocument and also the rpt file is read server-side); and then to send the ReportDocument to the client and attach it there to the crystalreportviewer. However, because ReportDocument is nog serializable, this is not possible. Is there a way that I can build the report server-side (filling dataset, attaching to rpt) and then send the result to the client? I don't want to distribute the rpt files to the client...
-
Checking files on server via http?I have a windows app, and I need to check for some files on a webserver; retrieving their dates (last modified for example). Can I do this via http, or do I have to use ftp for that?
-
Loading an assemblyI just found it myself: Assembly assPlannet = Assembly.Load("Plannet"); Type typePlannet = assPlannet.GetType("Conseur.Plannet.PlannetClient"); MethodInfo methodinfoMain = typePlannet.GetMethod("Main"); Object obj = Activator.CreateInstance(typePlannet); Object[] args = new Object[1]; methodinfoMain.Invoke(obj, null);
-
Loading an assemblyI have a windows application called X, I build it, and evidently I can run the executable X.exe. But now, I build this application to a X.dll; and I want to load that X.dll from another application YYY.EXE, and start the X-application. I tried in Y: Assembly assemblyX = Assembly.Load("X"); // works Type typeX = assemblyX.GetType("namespace + classname"); // works MethodInfo methodinfoCOnstructor = typePlannet.GetMethod("?"); // ? How can I start application X? Thanks!