|
Ok Thanks 4 the info...
I don't know why name not showing there....
Regards,
Reji
|
|
|
|
|
@Reji,
Simple Answer: You can not feed values to Input File control. It is for security reasons. Otherwise a malicious website can feed c:\winnt\system32\ and then upload the files from your system right?
|
|
|
|
|
i have following difficulty :
how to set the value of custom validator errormessage property in javascript function i.e. the clientvalidationfunction()?
is it possible in clientside script?
There's never a Wronge Time To Do The Right Thing !!
|
|
|
|
|
|
:(How to get number of visitors on html pages
|
|
|
|
|
|
thanks but the given url is not working and its not opening page
|
|
|
|
|
thanks but this code is not working for html pages
|
|
|
|
|
wish to add a media player on my web page to play audio and vedio. But not aware how to code it to play sounds online.
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
You can use the object tag to embed to the player in your web page, you then need to use the client side script to do something like play, stop, pause .... You can easily find the sample code posted here using the search functionality or consult your friend google[^].
|
|
|
|
|
|
how can we restrict the treeview level....
actually when we r using treeview in .net 2005 we can add plenty of childs....
dont have any limits....
is it possible to restrict the levels....
|
|
|
|
|
If you create the TreeView nodes by binding the control to a data source, you might want to use the MaxDataBindDepth[^] property to limit the level.
|
|
|
|
|
give me clear idea please....
|
|
|
|
|
SwaSubhaVijju wrote: give me clear idea please
Step 1: Click the posted link.
Step 2: Read the document to see it is applicable to your case.
|
|
|
|
|
|
Hi,
I am working with an aspnet application which has a dropdown list control.
I am binding the data with dataset.The dropdown list width is set by the maximum character lenght, so I explicitly set the width of the control to say 50px, now the problem is some part text is truncated when it increases the specified width - 50px.
Can anyone tell me when I open the dropdown list its width should increase to the maximum character lenght and when I close it the widht should be the specified widht as 50px.
Thanks in advance,
Kalyan
|
|
|
|
|
Hi kalyan,
You can use the wordwrap property of dropdownlist to true so that the width of dropdownlist automatically increases
|
|
|
|
|
Hey MD, Does DropDownList has WordWrap property? I don't find such property for DropDownList Control in ASP.NET...
|
|
|
|
|
Here's the 30,000-ft. view: I wrapped an asp:Menu control in an ascx control. When I try to dynamically populate the menu in the ascx control, the items appear, but clicking on them fails to trigger the MenuItemClick event handler. However, if I statically declare the menu items in the .ascx page, everything is fine. Any ideas?
Here's the details:
My ascx page:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="TabStrip.ascx.vb" Inherits="TabStrip" %>
<asp:Menu runat='server' ID='muStrip' orientation='horizontal'>
</asp:Menu>
Code in my ascx.vb file:
...
Public Sub AddItem(ByVal sText As String, ByVal bSelected As Boolean)
If (bSelected) Then
For i As Integer = 0 To muStrip.Items.Count - 1
muStrip.Items(i).Selected = False
Next
End If
Dim mui As New MenuItem(sText)
mui.Selectable = True
mui.Selected = bSelected
muStrip.Items.Add(mui)
End Sub
Protected Sub muStrip_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles muStrip.MenuItemClick
' Raise user event handler.
RaiseEvent ItemClick(sender, e, miSelectedItem)
End Sub
...
Code in my calling-page .vb file:
...
Protected Overrides Sub HandlePageLoad()
MyBase.HandlePageLoad()
' Populate the tab strip.
If Not Page.IsPostBack Then
oxiTab.AddItem(" Administrative", True)
oxiTab.AddItem(" Maintenance", False)
oxiTab.AddItem(" Tests/Requests", False)
oxiTab.AddItem(" Reports", False)
End If
End Sub
...
If I put a breakpoint at the "RaiseEvent" call and try clicking on any menu item, I never reach the breakpoint. But if I add static menu items in the ascx page, the breakpoint IS reached.
Thanks.
|
|
|
|
|
The reason is that on the post back the server has to recreate the page, including all the controls. It doesn't know about the dynamically created menu on the post back and it can't wire up the event because there is nothing to wire it to. You have to rebuild the dynamic menu before the events are fired.
I'm just coming back to ASP.NET development after a bit of a gap and I don't recall what order things are done so I'm not sure when you need to recreate your dynamic menu, but I know it is possible becuase I've done it before.
|
|
|
|
|
Thanks for the response. However, I came across another article in the meantime that indicated it's along the same lines, but not quite the same.
It turned out the reason was simply that I was not assigning the "Value" field. In my particular instance, I have no use for the value field. I guess if you statically declare menu items, ASP assigns the value field behind the scenes if you do not explicitly declare a value. And apparently the value can be almost anything. I just assigned .Value = Guid.NewGuid() (or whatever the method is, I don't remember right now), and everything works just fine.
The moral of the story: ALWAYS POPULATE THE VALUE FIELD OF DYNAMIC MENU ITEMS!
|
|
|
|
|
Hi!
I have a login control (LogIn.asmx) and a search control (Search.asmx). When typing in the search control and pressing return the whole page is posted to the server. My login control is looking for IsPost back but still it tries to log me in?!
How should I do to prevent this behaviour? How can I make the page respond to the "correct" submitevent?
Thnx!
|
|
|
|
|
As far as I can understand, you have two usercontrols inside a server side form. so when you are pressing enter into search control, the postback fires and hence gives problem to your login control.
The solution is that you keep the two controls in two different forms in the page. Since there can't be two server side forms, so one of your forms have to be an ordinary html form, and you have to deal with that usercontrol in the classic ASP style.
Thanks
Pradipta Basu
|
|
|
|
|
The problem is, when you press Enter key from the Search control, its triggering Login Control's submit click... This is because Login Control has the Default Action Command.
To solve this problem, use javascript in onkeycode event of each TextBox control in your UserControl and trigger the Submit action when Enter key is pressed.
|
|
|
|