|
Please help me out dear i am not able to get the output .
Mohinder Singh
|
|
|
|
|
when i see the width of textbox in the property window it shows 245px. Px is for pixels.
Mohinder Singh
|
|
|
|
|
hi dear i am doing this but the textbox is not being shown in the form.
Dim txt as textbox
Txt = New TextBox
Txt.ID = "SubmitBtn"
Txt.TextMode = TextBoxMode.MultiLine
Txt.Height = New Unit(UnitType.Pixel, 24.0)
Txt.Width = New Unit(UnitType.Pixel, 250)
PlaceHolder1.Controls.Add(Txt)
I am using place holder. when i dont give any height and width i get the textbox but it is small. and i want a bigger textbox.
Mohinder Singh
|
|
|
|
|
Hi, I want to create a custom textbox control in ASP.Net using C#, which extends the properties of the normal textbox control and it only allows numeric, alphabetic and alphanumeric characters depending upon the users choice. It should have a built-in client side validation for the same. Also, it should have a property called required, which when set to true, the text box also shows the property of the required field validator.
-----Have A Nice Day-----
|
|
|
|
|
What have you done so far? Anything?
|
|
|
|
|
Yes, I tried and found out that I would need to override the OnKeyPress method to track the keys and show the messages correspondingly, but, this OnKeyPress method is for Windows forms and I want it for Web.
-----Have A Nice Day-----
|
|
|
|
|
JavaScript also has an onkeypress method that you can use for the client side validation.
|
|
|
|
|
I want the textbox to do everything as a custom control, so that whenever the textbox is used in any form in any project, no code needs to be written anywhere for it.
-----Have A Nice Day-----
|
|
|
|
|
It will if you extend the control as it will inherit all of it's properties and methods.
|
|
|
|
|
I think in web you can't handle keypress event on server without a postback
|
|
|
|
|
Hi all.
When i tried to copy my web application folder and create a new copy in the wwwroot folder, with different name and settings, i am getting the following error, it was opening hitherto and i was able to make some changes and build them as well.
After i closed the IDE and reopened it, i am getting this error.
unable to get the project file from web server.Unable to open web project 'XXX' .The file path 'C:\INETPUB\WWWROOT\XXX' does not correspont to the URL 'http:\localhost\XXX'.The two need to map to the same server location.HTTP Error 401 : Access denied
I checked the webinfo file and the .sln file in notepad and found that the path is mapped correctly.
Any advise will be greatly appreciated.
Many Thanks,
Sid
If you fail for the first time , call it version 1.0.
|
|
|
|
|
krishna19 wrote: unable to get the project file from web server.Unable to open web project 'XXX' .The file path 'C:\INETPUB\WWWROOT\XXX' does not correspont to the URL 'http:\localhost\XXX'.The two need to map to the same server location.HTTP Error 401 : Access denied
Open XXX.csproj.webinfo file and change the location.
krishna19 wrote: I checked the webinfo file and the .sln file in notepad and found that the path is mapped correctly.
No problem with that
|
|
|
|
|
hi,
i am beginner developer in .net. suggest me some asp.net tutorials and .net tutorials where i can learn and understand concepts easily.
regards
Tech_spidy
|
|
|
|
|
|
Try starting here:
http:\\asp.net
http:\\aspnet.4guysfromrolla.com
|
|
|
|
|
Currently in the process of updating a project from V.1.1 to V.2. Previous project implemented a Drop down combo box which included auto complete. This drop down no longer works in V.2 and support is poor and no updates are available. We attempted using the Ajax extender control but the issue with this is it can only retrieve a single column of data. For most of the scenarios we are using it in we require a unique id to be retrieved too. Due to the original control being a drop down list it had a text and value attribute so could store this informaiton.
Does anyone know of a new third party control or other solution that would fix this issue? Thanks
|
|
|
|
|
I had it working with Ajax beta 1. I think it was beta 1 or an earlier version. Project is on hold for now. Anyway, take a look below. Might be helpful as it did work. It also had add-on-the-fly option.
aspx's javascript
function lfV()
{
try {
ListData.GetVesselID(document.getElementById('<%= Vessel.ClientID %>').value, vesselIDReturn);
} catch(e) { alert(e.message); }
}
function vesselIDReturn(vesselID)
{
if (vesselID==0)
{
if (!(document.getElementById('<%= butSave.ClientID %>')==null))
{
if (document.getElementById('<%= Vessel.ClientID %>').value.length > 3) {
if (confirm("The vessel, '" + document.getElementById('<%= Vessel.ClientID %>').value
+ "' does not exist. Please confirm it is spelled correctly with out abbreviations before adding. \n"
+ "Would you like to add the new vessel, '" + document.getElementById('<%= Vessel.ClientID %>').value + "'?"))
{
ListData.AddVessel(document.getElementById('<%= Vessel.ClientID %>').value, uid, AddVesselIDReturn);
}
}
}
}
else
{
document.getElementById('<%= VesselID.ClientID %>').value=vesselID;
document.getElementById('<%= butRefreshList.ClientID %>').click();
}
}
function AddVesselIDReturn(vesselID)
{
try
{
if (vesselID==0)
{
alert("Failed to add new vessel.");
}
else
{
document.getElementById('<%= VesselID.ClientID %>').value=vesselID;
}
} catch(e) { alert(e.message); }
}
aspx's html
<<ajax:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
<<ContentTemplate>
<<ajax:AutoCompleteExtender ID="AutoCompleteExtender1" TargetControlID="Vessel"
runat="server" ServiceMethod="GetVesselList"
ServicePath="~/WebServices/ListData.asmx" MinimumPrefixLength="1"
CompletionSetCount="20" />
<<asp:TextBox id="Vessel" runat="server" Width="277px" CssClass="stdText" OnTextChanged="Vessel_TextChanged"></asp:TextBox>
<<ajax:RequiredFieldValidator ID="rfvVessel" runat="server" EnableClientScript="true" ControlToValidate="Vessel" Display="Dynamic" ToolTip="A Vessel is required." SetFocusOnError="true">*</ajax:RequiredFieldValidator>
<<asp:TextBox ID="VesselID" runat="server" AutoPostBack="true" style="display: none;" Width="35px" CssClass="stdText"></asp:TextBox>
<</ContentTemplate>
<</ajax:UpdatePanel>
Code Behind
Vessel.Attributes.Add("onblur", "lfV();"); WebService class
<WebMethod()> _
Public Function GetVesselList(ByVal prefixText As String, ByVal count As Integer) As String()
Dim vesselCollection As BOs.VesselCollection = BOs.Vessel.GetVesselCollection(False, False)
Dim vessels As New Generic.List(Of String)
For Each vessel As BOs.Vessel In vesselCollection
'If vessel.Vessel.ToUpper.StartsWith(prefixText.ToUpper) Then
If vessel.Vessel.ToUpper.Contains(prefixText.ToUpper) Then
vessels.Add(vessel.Vessel)
End If
If vessels.Count.Equals(count) Then Exit For
Next
Return vessels.ToArray
End Function
<WebMethod()> _
Public Function GetVesselID(ByVal vesselName As String) As Integer
Dim vessel As BOs.Vessel = BOs.Vessel.GetVesselCollection.GetByVesselName(vesselName)
If Not vessel Is Nothing Then
Return vessel.VesselID
Else
Return 0
End If
End Function
<WebMethod()> _
Public Function AddVessel(ByVal vesselName As String, ByVal uID As Integer) As Integer
Dim vessel As New BOs.Vessel(vesselName, False, uID)
If vessel.Save Then
Return vessel.VesselID
Else
Return 0
End If
End Function
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Respected Gurus
I have to open a window thru javascript.Take a input and send back that value to the opener.
i am able to open the window retrieves the value but not able to get that on the parent..
i have tried to store the value on the parent page in a textbox..
function exit ()
{
var name =tya . value;
if (! opener . closed)
opener.document.f.prodname.value = name;
close ();
}
i m calling this function on click of the ok button on the child page.
also prodname is a textbox on the parent page.
i m gettin the error opener.document.f.prodname is null or not an object.
i hav tried to run the script in the body section also but same error.
any ideas...............
|
|
|
|
|
MissionSuccess wrote: i m gettin the error opener.document.f.prodname is null or not an object.
Try opener.document.getelementById("yourcontrol").value
|
|
|
|
|
i am having a checkbox on login form for remember me.
when by default in the form if checkbox is checked and then
when i uncheck it then too in code it goes into
if(chkremember.checked)
although i had unchecked it .i had turned off its view state. WHat should be done. Pls help me .
thanks in advance.
|
|
|
|
|
I have one Dropdownlist and one listbox. Dropdownlist contains all doctor names and listbox contains specializations.
I have 3 tables (Doctor,DSpecialization and DSpecializationDetails)
DSpecializationDetails-(DoctorId(PK) and DSpecializationId(PK))
Doctor - (DoctorId(PK),DoctorName)
DSpecialization-(DSpecializationId(PK), specializations)
One Doctor could have many Specializations
I want the user to be able to choose 1 or many specializations,
and insert the selections into a table called DSpecializationDetails.
I’m working with Asp.net and C#
Thanks for any help.
|
|
|
|
|
|
I didn't get idea how to do this. Ex, I select a doctor from dropdownlist and select two specialization from ListBox.. Now If I click insert button there are 2 records has to be inserted in DSpecializationDetails table. How can I approach to solve this? just give me briefe idea. Its great if you send sample code..
Thanks
|
|
|
|
|
How to disable / find popup blocker thru code?
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
sylvesterg wrote: How to disable / find popup blocker thru code?
I think you can't. That's the security feature
|
|
|
|