|
I am using treeview in .net 1.1
For that purpose i have to install IE Web Control.
I have downloaded it but not able to install it
I m not able to find the dll file required to add in toolbox of visual studio
plz. help me out.
prakash sawant
|
|
|
|
|
Did you read the readme.txt file in the download to have an idea on how to build the source code and the runtime files? Also, you'll have to manually add the assembly to the Toolbox of the VS 2003.
|
|
|
|
|
Yes, i successfully installed IE Web Control
And i also adde TreeView Control to the toolbox of Visual Studio IDE.
Now can anyone explain me how to use it
because, i used it but it is not showing me child elements below one another,
it is showing all are in one row..
plz help me out.
prakash sawant
|
|
|
|
|
it seems you forgot to copy the contents of the Runtime folder to the web client folder at root as the readme.txt said.
|
|
|
|
|
oh ! i now copied whole Runtime folder to my root directory
now , it is showing all parent and child elements in tree structure
but one problem occured.....
i am able to set the properties of TreeView Control in desingn mode..
but if i switch over to codebehind page,
and when i try to access the properties of TreeView control by making the obj of that control, it cant do so.
i am not able to access the properties of TreeView Control in CodeBehind...
i can set properties at runtime........
plz. help me out.
prakash sawant.
|
|
|
|
|
could u pls help me out how to go forward for pagination in the asp.net
pavani
|
|
|
|
|
This[^] will help you in this regard.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I have a master page (MasterPage.master) and it's called by Default.aspx. Then I added a web user control (WebUserControl.ascx), I tested it all and everything was working great. I decided to add some color to the user control by way of CSS (StyleSheet.css), now I have problems. I don't want to add a link to the MasterPage head since not all pages using the master need the css. How do I programmatically have my WebUserControl.ascx.vb add a link tag to my page head? I think I explained this well, but if not just post your questions and I'll try to answer them. Thanks for any help offered.
|
|
|
|
|
Hi,
There are two ways available to resolve your issue.
1. Simple and easy way.
Put all your CSS styles in a style sheet and save into your project.
<your script> string should be:
<link href="your css path" type="text/css" rel="stylesheet" />
Add the following code to your control's page load event:
Page.ClientScript.RegisterClientScriptBlock(GetType(), <unique string identifier>, <your script>, false);
2. Some more work but efficient.
Create a function in for your master page like,
public void AddCssLink(string cssfile)
{
HtmlGenericControl styleCtrl = new HtmlGenericControl("link");
styleCtrl.Attributes.Add("href", "Styles/" + cssfile);
styleCtrl.Attributes.Add("rel", "stylesheet");
styleCtrl.Attributes.Add("type", "text/css");
Page.Header.Controls.add(styleCtrl);
}
from your control's page load event,
Master.AddCssLink("<your css file>");
Happy programming.
With Best Regards,
P.Anbuselvan
IT Consultant
Emirates Group IT, UAE
|
|
|
|
|
I think there are many ways to do what you want. You can programmatically access the Header[^] of the current page using the Page.Header[^] property and simply add the stylesheet. You can also do as someone said by injecting text or control (should use the HtmlLink Class instead of the generic one).
|
|
|
|
|
Hi
Am having few fields in my db table whose dbtype in SQL Server 2000 is money.Its of length 8 chars.
Now i want to display them in textbox for editing and saving.
Can anyone please tell me, if the length is as 8 whether it means the whole number part or the digits after the decimal point?(Say, i=12345678.0000--> whether the whole length of 'i' is 8 or only that '12345678' should be of length 8 chars).
I need this because i want to set the maximum length of the textbox such that
it should restrict the numeric entry to that of the Datatype's length in thw textbox and
if the user enters the 9th character as Whole number,it shouldnt allow.
Is there any explicit way of writing validation expression for this?
Please help me.
Thanx
VSree
|
|
|
|
|
As per my understanding, money can take upto
Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit.
So you need to restrict from user text box....
Amit
|
|
|
|
|
Thanx Amit
I need to know how to know to restrict that from Textbox.
Can you please help me for this?
|
|
|
|
|
I am using Money in my application. This is what I did.
The name of money columns were: mnColumnName
The datatype of money columns were: Int
The display formats in the TextBox/DataGrid were Currecy
Look up data formatting for ASP Controls. This was the easiest for me.
|
|
|
|
|
Thanx Friend
I am able to format the 'Money' data in the grid.
But i need to restrict the user from entering incorrect format.
For example,if he wants to enter '1244566.87' or '1244566',either of these should be allowed..
The whole number part(here '1244566') of maxlength as 8 characters and that of digits after decimal point(here '87') of 4 chars in maxlength.
Can anyone help me?
|
|
|
|
|
Let me get this straight..
You want to the user to input data which is from 1-8 character long AND 1-4 decimal places?
So the user CAN input: 12345678.1234 // 1.1 // 1 // 12345678 // 1.0
and CANNOT input : 0.1234 // 123456789 // 0
If that is correct, then just go to the website (http://regexlib.com/DisplayPatterns.aspx) and look for the correct regular expression for it. When you find the espression, use a <asp:RegularExpressionValidator>.
The thing is, I don't have the time to search for you. I did not have the same conditions as you did. I am trying to meet a deadline myself. Hope you find your answer.
|
|
|
|
|
Thanks very much!
I got through my problem and its working fine now...
I have written the validation expression already.
I had a little problem over there and i rectified it now..
Thanx!!!
|
|
|
|
|
Hi guys
I need to use user control in ASP.net(1.1). Before using the control, I thought to desing one small sample to see in/out of usercontrols. I am facing very basic problem and appreciate your help. Please note I am using VB.net as code behind language.
I need to access user control text box values on click of web form Submit button.....
Code Steps at ASCX
--------------------
1)Created a user control LoginControl.ascx with two text boxes as TextBox1 and Textbox2 for name and password.
2)Created two properties _Name and _Password
Code Steps at Webform
-------------------------
a)On the same project created a new web form
b)Drag the ascx control
c)Declare public variable Dim objUser As New LoginControl
d)On Page load objUser = New LoginControl
e)And on click of Web Form (Submit Button)
objUser.Name = CType(objUser.FindControl("TextBox1"), TextBox).Text
objUser.Age = CType(objUser.FindControl("TextBox2"), TextBox).Text
Me.Label1.Text = objUser.Name
Me.Label2.Text = objUser.Age
Statement e is giving object reference is nothing error.......
PLEASE HELP
Amit
|
|
|
|
|
I believe that the id of the user control declared on the web page by default is something like LoginControl1 , not objUser . VS 2003 basically does not automatically add the declaration of the web user control for you, and you'll have to manually do that with one note that the variable name must be the same as the id of the web user control after you drag onto the web page. Something looks like:
Protected WithEvents LoginControl1 As LoginControl
Also, you should expose the values of the child textbox controls via the two public properties that you already define in the user control. And from the web page, you simply get the textboxes' values via the user control's properties.
|
|
|
|
|
thanks. Can you share some sample source code. (VB.net)...Thanks in advance.
|
|
|
|
|
Public Class LoginControl
Inherits System.Web.UI.UserControl
#Region " Web Form Designer Generated Code "
...
#End Region
Public Property Name() As String
Get
Return txtName.Text
End Get
Set(ByVal value As String)
txtName.Text = value
End Set
End Property
Public Property Password() As String
Get
Return txtPassword.Text
End Get
Set(ByVal value As String)
txtPassword.Text = value
End Set
End Property
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
End Class
|
|
|
|
|
Hello,
I am creating a Poll system and I need to check if a user has already voted.
What should be the best way to do this?
1. Should I save the user IP along with its vote in the database?
But does not some users IP change each time they access the internet?
2. Should I place a cookie in after the user voted?
Well, any help will be great.
Thanks,
Miguel
|
|
|
|
|
If this is for authenticated users only, then you could always associate the vote and the users. If everybody can vote, then you should use cookies.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hey every one.
I have a webpage with server-side controls that are validated on the server side, however this is costly so i would like to perform some of the validation on the client side (using javascript).
How do i go about performing the validation on the client side.
I have tried changing the control to for example but the page doesnt load and i am informed this is an invalid attribute.
Is this possible and if so how do i go about it?
Thanks
Dan
|
|
|
|
|
Use the ASP.NET validator controls.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|