|
To navigate the dropdownlist, you'll need to write some javascript to handle the onkeypress event. In that code, you'll want to test for the arrrow keys, and adjust the dropdown list's selectedIndex property. Google has plenty of examples. To get you started, check out:- An example[^] of handling key presses
- An example[^] of working with the dropdown list's options and selected index
As far as the behavior of CTRL+F4, opening the IE address bar is an operating system level decision. I believe that you can capture the keypress, perform your desired action, and not bubble the event using the same technique as above. I haven't tested it, so you may want to give it a try.
Hope that helps.
--Jesse
|
|
|
|
|
How to navigate through dropdownlist with arrow keys .
Whenever we change the index of dropdown then the SelectedIndexChanged Event Occurs, but we dont want to fire this event on Up and Down arrow keys then what to do?
Also I have another question that - when the focus is on the dropdown and we press CTRL+F4 then dropdown of AddressBar opens Instead of that dropdown.
|
|
|
|
|
Set the auto postback property to false. This will stop the post back event from getting fired.
|
|
|
|
|
Hi guys,
i am transforming an file called XMLFile.xml along with the appropriate xslt file
like this:
XPathDocument surveyDoc = new XPathDocument(Server.MapPath("XMLFile.xml"));
// Load the xslt to do the transformations
XslTransform transform = new XslTransform();
transform.Load(Server.MapPath("dynamicControls.xslt"));
// Get the transformed result
StringWriter sw = new StringWriter();
transform.Transform(surveyDoc, null, sw);
But the xmlfile.xml contents are like:
<formname name="BusinessUnit">
<contol type="text" name="BuisnessUnit" value="FirstName" required="yes">
<contol type="text" name="Code" validation="true" value="LastName" valtype="numbers">
<contol type="text" name="LegalEntity" value="EmailId">
<contol type="text" name="Place" value="DOB">
<contol type="text" name="DateOfBirth" value="BusinessUnit">
followed by another form details.
<formname name="foreign unit">
details
so i want to specify the required formname in new XPathDocument=(Server.MapPath("XMLFile.xml")); //i.e BusinessUnit for ex: not the entire
xml file how can i pass only the required xml content(i.e only a part of the xml file containing required form details) want for transformation.I.e i dont want to transform foreign unit part also within the xml file.Please throw some light on this.
Thks in advance,
-- modified at 6:56 Sunday 16th July, 2006
|
|
|
|
|
Hi all
I am new in ASP.NET and i neet to find and record visitors IP address. i tried some ways but sorrily the IP of visitors are not real and i recieve just one IP for all visitors.i think that is a virtual IP of my HOST(10.0.0.3). i use this codees:
1) System.Net.Dns.GetHostByAddress(System.Net.IPAddress.Parse(System.Web.HttpContext.Current.Request.UserHostName)).HostName
2)System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST")).HostName()
3)Request.ServerVariables("REMOTE_ADDR")
4)HttpContext.Current.Request.UserHostAddress.ToString
5)HttpContext.Current.Request.UserHostName.ToString
but i get Te IP:10.0.0.3 for all visitors.
Can anyone help me please and what is the problem??
thank all
|
|
|
|
|
Rather then trying to invoke a DNS lookup, have you tried using the UserHostAddress property of the Request object?
For example:
string clientIP = Request.UserHostAddress;
--Jesse
|
|
|
|
|
Hi
yes sir i used Request.UserHostAddress but the result was that and that was like other codes. and sorilly i can't find real IP Address. where is the problem???
|
|
|
|
|
Hrmm... I'm not sure that we have enough information about your environment to help here. It may be helpful if you describe the hardware and software setup of your environment in greater detail.
If the standard means of retrieving the visitor's IP address are failing, I'd speculate that there is some kind of environmental issue here. If you have a load balancer, firewall, or proxy forwarding traffic to your server, you may wish to start your search there. Are they configured to send the actual request IP along?
--Jesse
|
|
|
|
|
I am using a free trial host (http://vwdhosting.net) and i write my code with Visual Studio 2003.NET other methods work properly. but Ip dosn't.
|
|
|
|
|
Pls try
Request.ServerVariables("REMOTE_ADDR")
or
Request.ServerVariables("REMOTE_HOST")
|
|
|
|
|
Hi
Please Read my Question carefully i wrote that i have used that codes i have used 6 type of codes. and your code is there. but the resulat is the same.
1) System.Net.Dns.GetHostByAddress(System.Net.IPAddress.Parse(System.Web.HttpContext.Current.Request.UserHostName)).HostName
2)System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST")).HostName()
3)Request.ServerVariables("REMOTE_ADDR")
4)HttpContext.Current.Request.UserHostAddress.ToString
5)HttpContext.Current.Request.UserHostName.ToString
6)Request.UserHostAddress
thanx
|
|
|
|
|
How to change the ToolTip message in a calendar for specific dates only.
Is there an event that detects if the mouse is over that date so I change the ToolTip value.
Mohamed El Gohary
|
|
|
|
|
Two options:
+ Override the Render method, and replace the default setting for the ToolTip in the Title attribute of the A element with your own value.
+ Create a DayRender event handler, make the default LiteralControl of each cell invisible, then insert a new hyperlink/linkbutton which allows you to set the Tooltip.
|
|
|
|
|
Sir,
I have a datagrid and problem lies into the edititemtemplate of datagrid.
I have a datagrid in the following format
--------------------------------------------------
Column1 Column2 Column2
abc1 EditImage Delete Image
abc2 EditImage Delete Image
abc3 EditImage Delete Image
-------------------------------------------------
Now when i click at the particular editimage then the control goes to the the edititemtemplate where i am using a function to construct a table in that particular row of the datagrid in which i clicked at the editimage .In the edititemtemplate i am calling a function in the following format.
------------------------------------------------
<EditItemTemplate>
<%#LoadTable(Container.DataItem(0).ToString())%>
</EditItemtemplate>
--------------------------------------------------
Now the table is not comming into that row but a message is being displayed in that row and the message is
System.Web.Ui.HtmlControls.HtmlTable
But i want the structure of the table instead of this message .
------------------------=---------------
I am using the following code in the LoadTable
function
----------------------------------------
Public function LoadTable(Byval str as string)as Sysytem.Web.Ui.HtmlControls.Table
dim con as new oledbconnection("connectionstring")
con.open
cmd=new oledbcommand("select * from abc where id=" & str , con)
cmd.executereader
dim dr as oledbdatareader
dr=cmd.executereader
dim t as new system.web.ui.htmlcontrol.table
dim drow as System.Web.UI.HtmlControls.HtmlTableRow
dim dcell(1) as New System.Web.UI.HtmlControls.HtmlTableCell
--------------------------------------------------------
while(dr.read)
drow = New System.Web.UI.HtmlControls.HtmlTableRow
dcell(0) = New System.Web.UI.HtmlControls.HtmlTableCell
dcell(0).Width = "30%"
dcell(1) = New System.Web.UI.HtmlControls.HtmlTableCell
dcell(1).Width = "70%"
dcell(0).InnerText = dr.Item(0)
dcell(1).InnerText = dr.Item(1)
drow.Cells.Add(dcell(0))
drow.Cells.Add(dcell(1))
t.Rows.Add(drow)
end while
----------------------------------------------------------
End Sub
please help me to construct the table in the datagrid row at edititem template of datagrid
-- modified at 3:57 Sunday 16th July, 2006
|
|
|
|
|
Okay, before you accuse me of saying that I should have looked around better let me say that I already have ASP.NET working perfectly, no problems with ASP.NET pages. However, I'm trying to get a plain old ASP site to come up on the same server to no avail. I have confirmed that I have the asp.dll file, and I have registered it. I can display a simple index.htm from this folder, so IIS can actually see this folder. Any suggestions? Last modified: Saturday, July 15, 2006 1:11:55 PM --
|
|
|
|
|
If you have Norton Antivirus installed on your machine, you may have to disable "Script blocking". Otherwise ASP doesn't work.
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
I thought you were on to something there. However, I killed NAV and still no go. I was just hoping to be able to view the ASP page (which I didn't write) while I rewrote what I saw in .NET. Instead, I opted just to read the source and go from there. Just not worth the headache. Thanks anyway.
|
|
|
|
|
when i use <asp:label> tag, it changes as in html code page, but i want that the tag i'd written, change as in html code page, so which <asp:..> control should i use for it?
|
|
|
|
|
I think you need to be more specific as to what are you trying to accomplish. Your basicaly saying and asking the same thing.
adamoz wrote: when i use tag, it changes as in html code page
adamoz wrote: but i want that the tag i'd written, change as
in html code page
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Dear friends
i have a html file on my system's c drive, i want to display it on web page below a button control. when i click this this button, this file should be displayed.
Pawan Mishra
MCA, MCP.NET, MCAD.NET
|
|
|
|
|
Hi there,
Just simply reading the file's content by using System.IO namespace....show it on webpage then...
<< >>
|
|
|
|
|
Or put it in an IFrame....a little simpler
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
in a windows services, if we are calling an exe file and we want the UI of the exe to show on desktop. then Under LogOn tab (in services in administrative tools), we check "Allow Service to interact with Desktop" checkbox.
i want to know is there any way that we achieve this through coding.
i mean, can we make that windows service already configured to "Allow Service to interact with Desktop" checkbox checked through coding.
thanks
|
|
|
|
|
I think those are registry settings. you might find that Microsoft has hidden such information in the DOCUMENTATION and what does this have to do with ASP.NET?
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Here is how to do it in C#:
http://it.expertmonster.com/question/Allow-service-to-interact-with-desktop-112.html
|
|
|
|