|
hello,
I'm making a website with ASP.NET & C#.
There are a lot of controls. for example, button control, ListBox Control, etc..
I would like to use Tab Control.
In order to add the Control, I choose <tool> -> <tool box="" item="" choice="">.
and I added.
but any event was not happened.
could you help me how to add "tab control"?
Thanks.
p.s. I'm not native speaker, so I don't know if my words make sense.^^;
Thank you..
|
|
|
|
|
look at this [^] cp article
Yusuf
|
|
|
|
|
wow.. really thank you so much ^^
|
|
|
|
|
Hi all,
i am trying to use the following on asp.net / C# application:
On server side:
public static void AyudaContextual(System.Web.UI.WebControls.WebControl vControl, string Texto)
{
vControl.Attributes.Add("onmouseover", "OnMouseOver(txtInfo, " + Texto + ")");
}
On client side: (in-aspx page code):
<head runat="server">
<script type="text/javascript">
function OnMouseOver(TextBox, string) {
TextBox.style.backgroundColor = "#DEDFDE";
TextBox.style.color = "#006666";
TextBox.style.fontWeight = "normal";
TextBox.innerHTML = string;
}
</script>
</head>
as you can see, all i want is that when i hover my mouse on vControl control, its onmouseover event changes TexBox "txtInfo" appearence and puts some text ("Texto") inside it. But i have no idea how to specify the second argument (Texto), the other code seems to work.
I am new to asp.net so this question maybe is too simple.... thanks for helping me.
modified on Saturday, February 28, 2009 3:59 PM
|
|
|
|
|
try: vControl.Attributes.Add("onmouseover", "OnMouseOver(txtInfo, "'" + Texto + "'")");
|
|
|
|
|
Thanks Calin, got it working here.
Cheers
|
|
|
|
|
hi
I have this webpage called register.aspx. user has a form of 4 fields and completes them to get an activation email and ... .
Where I want to optimize my code is a place where I want to use a try & catch block where if user enters an existing username he will divert to catch block that tells him to reconsider about his/her username. I mean I want to stop username duplication, what kind of exeption or sql query do I need to use? Please inform me with details since I am kind of new
Thanks
Proper Prepration Prevents Poor Performance! h
|
|
|
|
|
You can put a primary key or unique constraint on the user name column and then, when the SqlException gets thrown because of violation of the constraint, you can display the error message to the user.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
hi there, for sure this solution is the best but please tell me how should I do this.
I have my primary key on ID field but how can I put unique constraint on a field?
and what is the code to to get the thrown sqlexception? please give me coding way too.
Proper Prepration Prevents Poor Performance! h
|
|
|
|
|
A primary key, by definition, has a unique constraint on the column.
The code should look something like this:
try
{
... try to insert new record ...
}
catch(SqlException se)
{
... set error message to something appropriate ...
} If you go to Google and search on "asp.net simple login page," you'll be amazed at the number of different samples for different databases that exist on the Internet. I don't feel like reproducing that here.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Instead of relying on exceptions to catch the error, you should just do a database connection yourself selecting the user with the supplied username, if a row is returned, then that username exists. Following code is in VB.NET
Dim strQuery as string = ""
strQuery should be where you select * from users where username = username you're trying to test
Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("mainDBConnection").ConnectionString)
conn.Open()
Dim cmd As New SqlCommand(conn.Database & ".dbo." & strQuery, conn)
Dim dr As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
if dr.HasRows = true then
'DISPLAY ERROR MSG
end if
Obviously you'll have to change around specifics like database connection string etc. Hope this helps.
|
|
|
|
|
Can any tell me free plagiarism software to integrate in asp.net
|
|
|
|
|
Hello,
Im building a news page. The data is stored in an access db. Im using a datalist control to retrieve newsid and title. Ive wrapped a navigateurl control around the title using the newsid and am posting the page back to itself. This works fine. On the same form I have another datasource control to select the newsid and news detail.
I want to display the news detail on the same page when a user clicks on the title in the datalist. Other than a detailsview control is it possible to display the data in some other way ?
Many thanks for your help.
Bruce.
|
|
|
|
|
Hi friends i m looking coding for dynmaic controls. how to acess the value from a dynamic text box . if we r creating some text boxes at run times then how will we retain thr value when page unload or postback .
Thanks
Jasjit
|
|
|
|
|
You may use FindControl() method to search for controls in a container control(Page, Panel, etc..)
So, for example to search for a TextBox control which is contained in a Panel , you have to call panel.FindControl("textBox1") and make a cast from Control to TextBox .
Calin
|
|
|
|
|
please i am trying to build a progam that will generate barcodes, stores the original characters in a database and prints the barcode image on a ticket.
the same program should be able to read the barcodes on the ticket and match them with original character stored in the database thereby giving or denying access to the carrier if the validation was successful or not. i need help.
i would like to get source codes and i am not limiting the option to only ASP.NET. i can handle java and php too.
urgently waiting.
|
|
|
|
|
Have you started to implement the program? On what sections do you need help?
You are waiting to get the program done?
Calin
|
|
|
|
|
hi,
please can some one give me an example of how xslt /xsl is used in dotnet.<
swetha
|
|
|
|
|
Here[^].
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi,
How can I sort nodes in a TreeView Control
Best wishes
|
|
|
|
|
Sorting in the TreeView is a manual process. You need to implement it yourself. Here's a link[^] to get you started.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi
I am developing a web application in ASP.Net 2.0
I have a web page for project registration in which I can add project details like Project code, name description,start date, end date etc. I want to include in this page the project members and roles.
I have added a table with 2 columns which contains combo boxes bounded to Project member table and roles table. Also a button to add new member. On click of the add button i create new row to the table with combo box controls bounded to project members and roles. But I cannot retrieve the selected values of the dynamically added controls.
Can any one please help me to solve this.
With kind regards,
Jimi
|
|
|
|
|
when i was trying to move from loginpage to some another aspx page like adminindex.aspx page it is redirecting to the same login page. i used response.redirect as well as server.transfer in login button click event of loginpage
|
|
|
|
|
send me the code.
Regards
Keyur Satyadev
|
|
|
|
|
hi
i developed a web application
now i need to convert it into intranet application
which can run in only company environment only
thanks in advance
lavan kumar
|
|
|
|