|
Hai
U r right..The frames concept can be applied only in Web apps..And As for windows apps..u have Horizontal and vertical scroll bars readily in ur tool box. U can use them in ur apps and write events as appropriate..
And there are plenty of articles avaliable in net about the usage of Scroll bars..And dont have any idea abt resizing the chart..
Regards
Gamya
|
|
|
|
|
Thanks Gamya.
I'll keep researching this. If I find any resizing/zoom info relating to scroll bars, I will post back to this thread.
|
|
|
|
|
And just now i found out that thru panels we can have the autoscroll set to true..
|
|
|
|
|
Cripes...I'm working up a very rudimentary database app with data-bound controls: load all records to datagrid and user can filter results by choosing elements from lists.
Problem: during app initialization, a button to reload datagrid with filtered results is being clicked repeatedly. I've isolated the routine in another function (not in button_click), and it is fired ~20 - 30 times during startup.
Any ideas on how/why this is happening?
|
|
|
|
|
Please check your code clearly and make sure databinding takes place in one place , which need to be after Initialization(). If you can show me, that cose block, then that will be very nice to trace the issue.;)
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Thanks for the feedback. As usual, providing details will help the analysis.
Yes, I have placed all the databinding after Initialization(). The 'load-filtered-data' button has only one statement: a call to a dataview filter routine. In this routine I build a filter statement, using the selected list item:
private void Filter(string comboString)
{
string filterString;
filterString = "EngrName='" + comboString + "'";
DataView myDataView = new DataView(workordersDataset1.Tables["WorkOrders"]);
myDataView.RowFilter = filterString;
this.dataGrid1.DataSource = myDataView;
this.dataGrid1.Refresh();
}
If I remove the call to this function and re-compile, my datagrid loads with all records -- exactly what I want. If I leave in the function call, the datagrid is blank, and the button_click &/or the filter function do not fire. I haven't built any error handling yet, and I'm sure that would help me to troubleshoot.
Thanks very much.
|
|
|
|
|
Hai,
I want to add , delete , update my details
say my form has
name:
domain:.net,java
exp..
I wnt these things to add/del/update into my db.
also i wnt search option to say
domain:dotnet exp :2+
from db all the persons meeting the key words shouls come with there entire profile.
in the profile area i also wnt to add a option to see my resume.
kindly some give me code for the above things
chand
|
|
|
|
|
To add, delete, or update, try
http://www.codeproject.com\useritems\ado.asp[^]
You should learn about SQL, if you haven't.
To search for person, you can use the query:
Select * from member where domain=dotnet and exp>1
Good luck.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Hi,
I have created an Arraylist object from an Arraylist class.
I added rows to the arraylist object and I need to find a particular record in my arraylist. How do I do this? Also if I was in the middle of building the arraylist and wanted to call the last record added to arraylist object how can I do this?
Thanks,
JJ
|
|
|
|
|
You can get the index of the object using thhis syntax:
ArrayList a = new ArrayList();<br />
a.Add("a");<br />
a.Add("b");<br />
int objectArrayIndex = a.IndexOf("a");
If you just want to access the object with the highest index:
string myString = (string)a[a.Count - 1];
Remember, it's a 0 based array, so subtract 1 from the Count property
|
|
|
|
|
Hi,
i have developed a application using c#.net . kindly tel me how to setup the project
please kindly give me the steps i have to follow.
i.e how to upload(r setup ) my whole application.
so tht i can give it to cilent . r make software
kindly reply
chand
|
|
|
|
|
In your Visual Studio.NET Solution Explorer, right click your solution and choose the Add option and select New Project. Now select the Setup and Deployment Projects folder icon. Pick the project that targets your code (i.e. win forms or web).
There are plenty of good tutorials if you search on Google.com
try This Tutorial[^] for starters
|
|
|
|
|
Hi. I'm using the "File.Move" method in the System.IO namespace. When I start my program and call this method it executes no problem. The second time I call it I am getting and error message saying "Exception: The process cannot access the file ... because it is being used by another process".
When I close the program and run it again the method runs fine, again for the first time.
I would think the connection is just not closing for some reason. Does anyone know how I can fix this?
|
|
|
|
|
Well, you could try calling dispose() on your object to see if it would help. My guess is your problem is somewhere else. Are you using any FileStreams ? You definately need to close those by explicitly calling Close() on them. Post some more code if you can...
-Peter
|
|
|
|
|
Not enough information. Move what file? Is your application writing it? Are you holding it open? Where does this file come from that your trying to move?
The problem is obvious - "being used by another process". This means that you can't move a file that is open for reading and/or writing. So what has the file open?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My data adapter wizard will not configure a table with more than 100 columns. Is there a way to get it to do so? I have tried to manually configure bt I get a syntax error message when I exceed 100 columns. Thanks
Mark
|
|
|
|
|
Do you have the ability to cut down on the number of columns in your table? 100 columns in a single table isn't a good idea.
|
|
|
|
|
I could spit the table into smaller related tables but i will still need to update 118 columns at the same time. It appears that 100 is the limit for a data adapter.
|
|
|
|
|
Split the table into smaller tables and use a DataSet with multiple tables. You won't have any issues with that approach.
|
|
|
|
|
I would like to change text on buttons on MessageBox, for example, OK changed to Accept...
I want some unicode text in my application, so I need change these text, help me
|
|
|
|
|
The possible text on a messagebox is set via an enum. If that doesn't suit, you need to write your own.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
|
HI,
Pl coreect the error its real urgebt for me . plzz
near this syntax iam getting error
password = (string)objcom.ExecuteScalar();
ERROR MSG
d:\inetpub\wwwroot\Naveen\WebForm1.aspx.cs(93): The type or namespace name 'objcom' could not be found (are you missing a using directive or an assembly reference?)
Lakshmi Narayanan <laks_win@yahoo.co.in> wrote:
Hi,
Code not tested, so pls chk the spell as well as case sensitive.
[code]
using System.Data.SqlClient;
........
........
private string GetPasswordFromDB(string userName)
{
string password = string.Empty;
//Consider <urtable> is having the fields namely, userId and PWD for
username and password
SqlConnection objCon = new SqlConnection
("server=localhost;database=test;Integrated Security=true");
objCon.Open();
SqlCommand objCom = new SqlCommand("select PWD from <urtable> where
userId = '" + userName + "'",objCon);
password = (string)objcom.ExecuteScalar();
return password;
}
[/code]
Regards
Laks.R
--- In dotnetoffers@yahoogroups.com, mukkasa sai <mukkasasai@y...>
wrote:
> Hai all,
>
> This is the code for login btn c#.net.
>
> my server name is SHAR , WINDOWS AUth in sql server . Pl give me
the code (marked in red i have to implement ado.net code). pl give
me the code
>
> just i have to chk pswd,username & (ck submit)go to main page .
give code to chk & login
>
>
>
> Code Behind
>
> using System;
> using System.Collections;
> using System.ComponentModel;
> using System.Data;
> using System.Drawing;
> using System.Web;
> using System.Web.SessionState;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Web.UI.HtmlControls;
>
> namespace LoginPage
> {
> ///
> /// Summary description for WebForm1.
> ///
> public class WebForm1 : System.Web.UI.Page
> {
> protected System.Web.UI.WebControls.TextBox txtUserName;
> protected System.Web.UI.WebControls.Button btnLogin;
> protected System.Web.UI.WebControls.Button btnReset;
> protected System.Web.UI.WebControls.Label lblError;
> protected System.Web.UI.WebControls.TextBox txtPassword;
>
> private void Page_Load(object sender, System.EventArgs e)
> {
>
> if(!Page.IsPostBack)
> {
> lblError.Visible=false;
> }
>
> // Put user code to initialize the page here
> }
>
> #region Web Form Designer generated code
> override protected void OnInit(EventArgs e)
> {
> //
> // CODEGEN: This call is required by the ASP.NET Web Form Designer.
> //
> InitializeComponent();
> base.OnInit(e);
> }
>
> ///
> /// Required method for Designer support - do not modify
> /// the contents of this method with the code editor.
> ///
> private void InitializeComponent()
> {
> this.btnLogin.Click += new System.EventHandler
(this.btnLogin_Click);
> this.btnReset.Click += new System.EventHandler
(this.btnReset_Click);
> this.Load += new System.EventHandler(this.Page_Load);
>
> }
> #endregion
>
> private void btnLogin_Click(object sender, System.EventArgs e)
> {
>
> string originalPassword = GetPasswordFromDB
(this.txtUserName.Text.Trim());
> if ((txtUserName.Text != string.Empty) && (txtPassword.Text ==
originalPassword))
> {
> lblError.ForeColor = System.Drawing.Color.Green;
> lblError.Text = "Login Successful";
> lblError.Visible=true;
> }
> else
> {
> lblError.Text = "Invalid User or Password";
> lblError.ForeColor = System.Drawing.Color.Red;
> lblError.Visible=true;
> }
>
> }
>
> private void btnReset_Click(object sender, System.EventArgs e)
> {
> if (lblError.Visible == true)
> lblError.Visible=false;
> this.txtUserName.Text = string.Empty;
> this.txtPassword.Text=string.Empty;
>
> }
> private string GetPasswordFromDB(string userName)
> {
> string password = string.Empty;
> //
> //TODO: Write the logic here to get the password from database
> // using ADO.Net
> //
> return password;
> }
> }
> }
>
>
> HTML
>
> <%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="LoginPage.WebForm1" %>
>
>
>
> <title>WebForm1
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> <asp:label runat="server" id="lblError" forecolor="#ff3333"
="">Invalid UserId or Password
> | UserName
> |
> <asp:textbox id="txtUserName" runat="server"> | Password
> |
> <asp:textbox id="txtPassword" runat="server"
textmode="Password"> |
> <asp:button id="btnLogin" runat="server" text="Login">
> <asp:button id="btnReset" runat="server"
text="Reset"> |
>
>
>
>
|
|
|
|
|
|
also in
http://localhost/w3schools/WebForm1.aspx page after
running . iam geeting (inweb page) like this .username with no text box &
password with no txt box.INVALID USERID&
PASSWORD R DISPLAYED OPENLY(i.e validation).
if no txtxbox & no password txtbox , no button then its not possible . iam using webserver controls.
pl kindly tell soln.
why this is coming the page w/o fields
pl reply
chand
|
|
|
|