C# - How To Create Cross Browser Custom Control
Feb 16, 2010I'm goingto create an asp.net control which should be cross browser. and support some skin - multilanguage and rtl & ltr support.
View 3 RepliesI'm goingto create an asp.net control which should be cross browser. and support some skin - multilanguage and rtl & ltr support.
View 3 RepliesIn our organization, we are still on .net 1.1 environment, using javascript, a few open source applications/widgets. Development is done using Visual Studio 2003, grid view, and iframes. Our application works in Internet Explorer 7 and IE 8 (in compatibilily mode).give any basic steps we can take to get our application to work cross browsers? What are the starting locations we can get at to start making existing code work in different browsers?
View 5 RepliesI want to create a custom control where I define several specifically named DIV sections. The code-behind logic of the custom control will perform operations on these named DIV sections. The page where the custom control is hosted needs to be able to add named controls to the DIV sections and perform operations on these named controls added to the DIV sections.
Let me explain a little further. In the custom control, I want to have code behind logic that fires the following Page Event and uses a condition to make one or another specifically named DIV section visible or not:
< _
ToolboxData("<{0}:BaseDetails runat=""server""></{0}:BaseDetails>") _
> _
Public Class BaseDetails
[code]...
how can I create a custom control which is able to generate the named DIV sections "DetailsNameDiv1" and "DetailsNameDiv2" where my custom control can check a condition and make one or the other visible. Also, I need to be able to add controls to these named DIV sections when I host the custom control and the control that I add to the named DIV section needs to let me set values of these controls from the code behind logic of the page (or usercontrol) where the custom control is being hosted (in my example, I am adding TextBox controls that I want to set the Text property from a SQL Data Reader).
I have currently on multiple pages a modal popup that displays the information below, we are getting to the point where we need to call this popup from multiple locations, currently i have duplicate setups on each page that i want to use it on, but its becoming a mess to manage when a change is needed.. so im looking to see if what i have within the modal popup can be turned into a control that i can call anywhere thru out the site and have just 1 setup to maintain going forward..If its possible to create a control that can then be placed within the modal popup and server the same purpose that would be great any links here is what i have within the modal popup that i have on atleast 3 pages currently..
[Code]....
Is there any free/open source X-browser tool ?
X-browser is primary thing.
I'm trying to use WebParts and I'm about ready to pull my hair out due to a couple of issues:
1.) Whenever I open my page up in Firefox, the dropdown that holds the verbs is being rendered as a row of hyperlinks across the top of the title bar. Since I put in custom verbs, this makes a single part as wide as the page and look terrible. How do I fix this?
2.) Are there any resources out there that show how to restyle the chrome and the drop down list that has the verbs?
I am trying to create a web custom control but I am unable to find the templete that should be in my projects window. I am using Visual Studio Pro and it should be there. Doc's say standard version doesn't have it but thats all I can find.
View 4 RepliesI need to make my site work well on a blackberry, i haven't put too much effort into getting this working yet, but i have a few questions which google is struggling with.I've read about detecting brower type and modifying the default behaviour of asp.net controls hereHow would I go about supplying a differant stylesheet to a specific browser, should i just do this?
if (Request.Browser.Browser.ToString() == "blackberry") //pseudocode
{
Response.Write("bb.css");
}
else
{
Response.Write("bb.css");
}
This will work fine, but i feel like there is a better method, i'm sure i've read about something in the past but i can't seem to recall.I'm also considering a response.redirect to a differant page for a blackberry, which at the moment i would implemenet in a similar way.
I have 2 domains that resolve to my web site www.mysite.com and www.mysitecommonmisspelling.com, plus the IP address. I have some code in my Global.asax file that was intended to force all users and crawlers to only use the main domain, like so:
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
'If the domain isn't the correct top level domain for this environment,
'we want to do a 301 redirect to tell the search engines that this is not the right domain to
'index.
Dim Host As String = Me.EnvironmentHost
Dim CurrentHost As String = Request.Url.DnsSafeHost[code]....
I checked and Google has not indexed any pages on www.mysitecommonmisspelling.com, so they are apparently respecting the 301. However, a few days ago we had a customer on our site who got free shipping because the licensing code that is only registered for www.mysite.com failed (in other words, the browser was able to access www.mysitecommonmisspelling.com). In the past, we have had issues with the 3rd party shipping component because users were able to access the site using the IP address.
In any case, we don't want users to be able to access the site without the correct domain so the SSL certificate doesn't complain.
I have searched for a way to disable 301 redirects in IE7, but there doesn't appear to be a way. So, what I am wondering is if there are any browsers that can disable 301, and if so what kind of workarounds can I put in place to ensure all browsers on my site are going to the main domain, www.mysite.com?
Whar are equivalent cross-browser solutions for window.showModalDialog? showModalDialog introduced in IE and FF 3.
View 4 RepliesI have an ASP.NET page and I am trying to quickly match the validation controls that are tied to a particular textbox (text input) using a jQuery selector. The validation controls render as a span and the "controltovalidate" property renders as an expando property. Here is a test example:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="jquery.js"></script>
</head>
<body>......
The problem: the ml_test() function shows 1 in Internet Explorer 7 (as expected), but shows 0 in Firefox 3.6.8. I tried adding additional controls, but in Firefox it consistently doesn't work.
I discovered this post that shows the use of an ampersand in the selector like this [@expando=value], but when I try this syntax, jQuery 1.4.2 throws an error.
Is there a cross-browser way to select expando attributes, and if so, what is the proper syntax?
I Have Page That Have GridView This GridView Have a Lot Of Rows my clients Want To Freeze The Fisrt column and curresponding header(For Horizontal scroll), and I tried below code
CSS
div#div-datagrid {/*style="height: 382px; overflow: scroll; width: 100%"*/ width:100%; height:382px; overflow: scroll;/*scrollbar-base-color:#ffeaff;*/}/* Locks the left column */ td.locked, th.locked { position:relative; cursor:default; background-color:White;/*IE5+ only*/ left:expression(document.getElementById("div-datagrid").scrollLeft-2);}
[Code].....
We're investigating if it's possible to have the following: A webpage with multiple 'folders' to which a user can drag & drop a files. It's meant to be used as an interface to upload scanned documents to an archive. For example, we would have page that states: 'Quotes', 'Invoices' & 'Misc'. Depending on the sort of document the user would drag & drop the file from the local file system to one of these three folders. It should then upload the file to the correct folder on the web server
View 2 Repliesdoes anyone know how to access a webpart using the HTML Document Object Model? for example: for a given page which contains a webpart manager and a webpartzone.
[Code]....
I cant access the custom control using the HTML DOM Like this: HtmlDocument doc = HtmlPage.Document;
HtmlElement element = doc.GetElementById("HostTest");
HtmlElement element1 = doc.GetElementById("silverlightControlHost");
HtmlElement element2 = doc.GetElementById("WebPartZone3");
HtmlElement element2Parent = element2.Parent;
HtmlElement element3 = doc.GetElementById("SLRoomConsumerPart1"); //element3 does not return anything at all just Null!
all of the other elements are returned except for element 3 which returns a null! Any controls (regardless if it is a custom control, ASP control, Usercontrol . i tried it by replaceing the custome control with an aspnet button. i go t a null value as well) placed in the <ZoneTemplate> Tag of the <WebpartZone> is not returned using the HTML DOM. I find this stupid and pointless, as the whole point of a webPart is that you can place all sorts of controls in it :
customcontrols, usercontrols html controls, html server controls, aspnet controls and you cant seem to get access to those controls using the HTML DOM model in codeBehind
<asp:WebPartZone ID="WebPartZone3" runat="server" Height="90%" Width="
<ZoneTemplate>
<cc1:SLRoomConsumerPart ID="SLRoomConsumerPart1" runat="server" />
</ZoneTemplate>
</asp:WebPartZone>
HtmlDocument doc = HtmlPage.Document;
HtmlElement my_WeBpart_Element = doc.GetElementbyId("myCustomWebPartControl1")
can anyone point me to a solution or a work around as i am trying to access the dom from silverlight 3 but should be exactly the same as doing it from the webpart'shosting page's code behind. so that i can reference the controls inside my web part from the code behind of the custom page once i get hold of the webPart Element referece.
I have a datagrid and vertical-horizontal scrollbars in it. now when datagrid will have more records , scoll bars will be provided. now when i scroll vertically , my header line of the datagrid is also scrolling so i wanna freeze it. i have used javascript to freeze it , its working in IE properly but there is problem with other browser.
i used this :[URL] but its not working in other browser.
I have a web application (SnapshotServer) which uses a WebBrowser control to take a snapshot images of a web page.
I use a WebBrowser control within SnapshotServer to navigate to a entry page of a secure web application (ImageHost) and then redirects me to my required page.The ImageHost application is protected by FormsAuthentication, which uses cookies. The entry page I navigate to takes care of logging me in - which will create an Auth cookie.
Once a response is generated from the ImageHost, I convert the result within the WebBrowser control to an image.
Issue:
When I run SnapshotServer on my PC (Windows 7, IE8), using IIS7, and navigate to ImageHost on my development server (Windows 2008 R2, IE8), the result is as required - I'm logged into ImageHost and redirected to the page I want an image of. When I run SnapshotServer on any Windows 2008 R2 server, using IIS7, and navigate to ImageHost on my development server (Windows 2008 R2, IE8), the result is not as required - ImageHost fails to log in - so my image is of the login page. The reason it fails to log in is that it isn't creating an Auth cookie.
So I'd like to know if anyone can tell me why the WebBrowser control, when run from a Windows 2008 server, cannot create cookies.
I use a Custom Validator (which validates on the server) and a button (it's PostbackUrl = "Page2.aspx").
When I press the button the browser show always Page2 without checking if the page is valid.
I want to create custom control in Asp.Net 3.5
View 5 RepliesI want to implement the own custom TextBox control in Asp.Net(C#).
View 2 RepliesI have a custom control that creates a textbox on CreateChildControls.I'm trying to set the value of this textbox (trough a property of the control) on the load event of the page that uses the custom control. Unfortunately at this point CreateChildControls haven't been executed yet and the textbox is null.
I called EnsureChildControls on the consumer page before using the custom control properties but no luck, still null.This happens when is not postback.
Im inheriting from GridView control creating MyGridView class which has cs extension, not ascx. U put it in App_Code folder and in web config added:
<add tagPrefix="mgv" namespace="MyProject"/>
it works fine but when I wanted to convert it to web site project I have problem that it cannot find this reference.
i have used this coding to create a custom Control as my knowledge in the pervious post.i dono it is correct or not.I need a further help regarding this.so far i have used this coding the appcode->Number.cs in that i have used this coding further what should i do: my requriements is that i drag the textbox in the controls only number should be entered in that.for reference see my previous post:http://www.eggheadcafe.com/community/aspnet/2/10200401/how-to-create-a-dll-file-for-the-textbox-with-some-requriments.aspx.i need it in web applications
using System;
using System.Data;
using System.Configuration;
using System.Linq;
[code]...
I'm creating a custom gridview control. so far I've been able to add custom sort arrows and an export to excel feature.
Now I want to have a textbox and a button in the header row to filter each row.
I want to extend either the boundfield or boundcolumn class to add a property that will allow me to distinguish wheter the column should have a filter textbox in the header.
I am building a custom web panel control for specific purpose.I want the control be fixed with specific width and height so that not to be resized in design mode as well as from property window.How can I do this.
View 2 RepliesI have a tree view created using HTML and Jquery only.
I would like to know can i create a custom control using just HTML and jquery to make it re-usable.