|
Thanks. I don't know how i missed that. but now i'm getting a new error. WIll you look at it above? Thanks. It seems pretty simple.
|
|
|
|
|
somePanel.add(lable1);
lable1.TextAlign = ContentAlignment.BottomCenter;
ps. I tried fill docking, anchoring but nothing seems to change
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
The text is only going to align within the label itself, so if you want it to align within the panel, it needs to be the same size as the panel.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi All,
I have a button "Change PAssword". When user clicks on that it displays a form like:
Old P/w:
New P/W:
Confirm New P/W:
& then a "proceed" button.
whenever user enter all these details & press Proceed, that new password should get overwrite by the one already exists in the database.
How is it possible? Could any one help me on this.....
Thanks in Advance!
|
|
|
|
|
Well, I guess you want to write a procedure that takes the id of the currently logged in person, checks if the old password entered was correct for that user, and changes it to the new password. That seems pretty obvious, but we can't offer more help than that because, beyond the trivial overview, the specifics are entirely dependant on the specifics of your database schema.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This is a really trivial process. First, you want to check that the user credentials are correct. If so, check the new password against the confirmed new password. If all is good, then run an update query based on whatever your database schema is.
"That's no moon, it's a space station." - Obi-wan Kenobi
|
|
|
|
|
this is a bit long process and it includes learning and reading
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Hi,
I have a question.
I have a comobox, i've bind data something like this
oleDbDataAdapter1.Fill(dataSet11);
DropDownList1.DataSource = dataSet11.Tables[0].DefaultView;
DropDownList1.DataTextField = dataSet11.tbacdes.ac_headColumn.ToString(); //Display AC Head
DropDownList1.DataValueField = dataSet11.tbacdes.ac_idColumn.ToString(); // Display AC Id
DropDownList1.DataBind();
first of all is correct. Now I want to to show Account Header in comobox and when user select any value than selectindex pass header id this my question, please help me out init.
Example
=======
[Student Fee] Display value and in backend of this entry in comobox header id is 2
I'm using asp.net 1.1, C#.Net.
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
Did you just mentioned (Urgent) in your post and (Butt) in your name
Ouch!!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
| Muhammad Waqas Butt | wrote: C#.Net ASP (Urgent)
OK, that really doesn't tell us much, except that you couldn't find the ASP.NET forum, and you're impatient.
| Muhammad Waqas Butt | wrote: DropDownList1.DataBind();
1 - please give your variables real names. I am astounded how many people post code here and have not set meaningful variable names
2 - do this only on the first call ( check for !IsPostback ), otherwise, your selected index will be lost on postback
3 - handle the SelectedIndexChanged event, then the form will postback when you change the selection ( or add a button so users have to select to do this ) and then in there, check the SelectedValue property, use int.TryParse to get it as a number, if it's a number, and do whatever database calls, etc you want with it from there.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: | Muhammad Waqas Butt | wrote:
DropDownList1.DataBind();
1 - please give your variables real names. I am astounded how many people post code here and have not set meaningful variable names
Yes, this is one of my peeves. People that do this can have loads of fun debugging when they have multiple forms with more than one DropDownList1 in their project if they do so.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
hi
well I'm making an application in which i need to take data from a text file and its a CSV file having data in this format:
Name,DateOfBirth,Age
Now I have got the data from it but I wanna represent it in XML format. I hae no previoud experience of working in XML. SO can u plz tell me how to do this?
Rocky
|
|
|
|
|
First make an idea on how your XML file should look. Make tags what you are going to use. Then split your CSV data with "," and get result in an array. Use XMLTextWriter class to create XML file. Start a loop and read all array values and write to XML file using XMLTextWriter object
|
|
|
|
|
ok thanks I'll try it out
|
|
|
|
|
Hi all,Im using in ASP.NET1.1,I can be able to upload data to the 'TreeView' web Control,but the problem is the structure of the Tree View is absent here...How can I do it?...Thank you in advance to my kind hearted friends...
Hi,Im Razana
|
|
|
|
|
Hi,
i have a collection of items in list box in the format:
1,1
1,2
1,3
1,4
2,1
2,2
..
now i want to store these values in database.
how to do this.
|
|
|
|
|
By calling your data layer. I can't tell you more, because you didn't provide any of the details. In fact, if you instead type the details into google, you're bound to find lots of info on calling a database from C#, whatever database that may be (Access/SQL Server/Oracle/etc )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for the reply..
I am using SqlServer. I am having a listbox with items in format:
1,1
1,2
..
2,1
2,2
..
Now I want to store them in a database table say testtable. I am a little confused and need a little help.
will u focus a ray of light to show me the path?
Regards
Sangram
|
|
|
|
|
sangramkp wrote: I am a little confused and need a little help.
You are not clear on what you need help with...Please give a bit more detail...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I need help on the context:
How to store the items og a listBox into a table in SqlServer Database.
|
|
|
|
|
I have a file(s) that contains text and binary data, the data in the file looks as follows (this is partial data):
LO50,207,692,8
A195,344,0,1,4,4,N,"{SZ}"
A400,221,0,4,3,3,N,"{LOT}"GW388,450,48,160,ÿ<ð<0ð<ÃÌ<0<ðð3ÀÃ<<0óÀÃÏÃÌ<ÀóÀðÌóÀÌ?ÿ<ð<0ð<ÃÌ<
A463,349,0,1,3,3,N,"{UOM}"
A616,358,0,1,3,3,N,"/59 ML"
A369,345,0,3,2,2,N,"FL."
Here is the problem, I need to have my program replace the tags (data enclosed in parenthesis) with some other information, then stored the new data in a second file. However, this must be done w/out affecting the binary data within the file, which does not need to be modified.
I do not know what encoding type is used for the binary part of the data, hence when writing to the destination file, the binary data is in the incorrect encoding type.
I know that I should probably be using "unicode" as opposed to "UTF" when reading/writing from/to the files, however, if I use "Unicode" how do I replace the tags by their value?
Thanks for any help on this,
Peter
The code that I'm using is something as the following:
//Read data from Source
FileStream fs = new FileStream(strSource, FileMode.OpenOrCreate,FileAccess.Read);
byte[] MyData= new byte[fs.Length];
fs.Read(MyData, 0, System.Convert.ToInt32(fs.Length));
fs.Close();
string sData = Encoding.UTF8.GetString(MyData);
//Replace tag with correct value
sData = System.Text.RegularExpressions.Regex.Replace(sData,"{SZ}","21231");
//Write to Destination File
byte[] bData = Encoding.UTF8.GetBytes(sData);
FileStream fs1 = new FileStream(strDestination, FileMode.OpenOrCreate,FileAccess.Write);
BinaryWriter bw = new BinaryWriter(fs1);
bw.Write(bData);
bw.Close();
fs1.Close();
|
|
|
|
|
Hi,
some information is missing: in the parts that are non-binary it is easy enough
to find parentheses and do whatever is required; but in the binary parts there
might be bytes that have the exact same value as a regular parenthesis has.
So you must know when to switch from non-binary (interpreting) to binary (dont
touch me) mode, and back. As long as this is undefined, no one can come up with
an approach that works.
You showing the file as if it is line oriented does not help either, since
the carriage return, line feed, new line, or whatever control character you
consider could also occur in the binary data and make you switch incorrectly from
binary to non-binary mode.
So you need extra knowledge; could be things such as:
- in binary mode some byte values will never occur; when they do, they exit
binary mode and are considered a non-binary symbol.
- optionally: and when they are needed as a binary value, they will be
escaped (i.e. prefix an additional special byte value), or produced twice.
- in non-binary mode only a selected list of commands will switch to binary mode
etc.
|
|
|
|
|
Hi,
I have a button with an event attached (This made me smile because there's not much point with a buttin that hasn't )
Anyhow - how can I get the value of the button.Tag to use within the code that is fired? It seems to be passed to the method but I can't see how to retrieve it?
TIA.
Glen Harvy
|
|
|
|
|
((System.Windows.Forms.Button) sender).Tag ?
|
|
|
|
|
That's it
I was very close to working it out and was on the right track - it was changing the object sender to a button object that actually had me stumped.
Thanks heaps.
Glen Harvy
|
|
|
|
|