|
Can you recommend any way to automate the login procedure?
|
|
|
|
|
ednet2006 wrote: Can you recommend any way to automate the login procedure?
The keywords you are looking for are "Forms Authentication" - There are a couple of good exampled on the MSDN website.
|
|
|
|
|
hi,
1)on the event of clicking button on a page i've to open print dialogue box to print the page on which that button is.
and
2) on clicking Link button showing emailId i've to open Outlook express.
How can i achieve it?
Please guide.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
(1) - javascript:print()
(2) -<a href='mailto:g_parwej@rediffmail.com'> Mail to link </a>
Keep Smiling !!!
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
i have one variable in double type, let say :
a = 123.45
b = 78.20
how to i convert it become 00000012345 and 00000007820?
Best regards,
Chee ken
|
|
|
|
|
Hi,
You will have to multiply by 100. Then convert to string. And padd number of 0's before the string. These number of zeros depend on length of the string you just created !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Multiply by 100, and use the format string "00000000000" to format them.
---
b { font-weight: normal; }
|
|
|
|
|
How to use the format string "00000000000" ?
Best regards,
Chee ken
|
|
|
|
|
For example in the String.Format method:
String s = String.Format("{0:00000}", someValue);
or in the ToString method:
String s = someValue.ToString("000000");
---
b { font-weight: normal; }
|
|
|
|
|
You can do it as following too:
Dim Formatted_a As String, Formatted_b As String
Const a As Double = 123.45
Const b As Double = 78.2
Formatted_a = Format(a * 100, "00000000000")
Formatted_b = Format(b * 100, "00000000000")
Eric H.
|
|
|
|
|
I get it ! thanks for reply !!
Best regards,
Chee ken
|
|
|
|
|
i want to write data into .txt file, so i using :
Dim objSWriter As New StreamWriter(.....)
objSWriter.Write(EmployeeNumber & " " &EmployeeName & " " & EmployeeAddress)
Since every employee name's length is not same, so the result at text file will be :
xxxxxx xxxxxxxxxxx xxxxxxx
xxxxx xxxxxxxxxxxxx xxxxxxx
xxxxxxxx xxxxxxxxxxxxx xxxxxxx
So i need to format the style of displaying data become :
xxxxxxxxx xxxxxxxxx xxxxxxxx
xxxxxxxxx xxxxxxxxx xxxxxxxx
xxxxxxxxx xxxxxxxxx xxxxxxxx
How to make this type of display format ?
Best regards,
Chee ken
|
|
|
|
|
Hi,
I think when you want formatted result, you already have set in mind the length of each fields. Just use some paddings. For this write a function which will take the value as input and add number of spaces to the left so that when you write it to a text file it looks formatted.
You can decide which type of padding you require. Left or right.
Hope i am clear enough !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
you can use padding in string define max. length of each field and then set the padding accordingly
e.g. suppose max. length of string is 40 and if the text is 7 chars long then put spaces in rest 33 characters like
String name = "Rashida";
name = new String(' ', 40 - name.Length());
|
|
|
|
|
That will result in name being a string of space characters.
|
|
|
|
|
so now i can add the remaining space to the string, but while displaying the data into text file, it also cannot show the data like:
xxxxx xxxxxxx xxx
xxxxxx xxxx xxx
because teh width of the space character is smaller than character, then how to slove it ?
-- modified at 21:41 Sunday 19th November, 2006
Best regards,
Chee ken
|
|
|
|
|
String.PadLeft() also works.
<br />
stream.WriteLine("{0}\t{1}\t{2}",EmployeeNumber.PadLeft(20),FName.PadLeft(20),LName.PadLeft(20));<br />
Assuming that you want tabs delimiting the columns, and each column to be 20 characters wide. A gotcha is that if any of these strings are more than 20 characters (or whatever length you specify) your value will be that length. PadLeft does not truncate, you'll have to do that yourself.
J-man
|
|
|
|
|
Hi all,
We are migrating our web application from VS.NET 2003 to VS.NET 2005.
after migrating to 2005, it is giving two major errors for the following:
1> In HTML, withing code and at page directive: strict implisit on not allow conversion from object to string.(I tried for both on and off option)
2> for declaring Text attribute for label and other controls in HTML, its giving error: text property can not assign declarative. (I have code like: Text="Jim")
I am very much new for vs.net 2005.
i really appreciate any help on this.
Thanks,
Thampi
|
|
|
|
|
1. That's true, it's best to convert parameters to object type and cast them inside your method.
2. The label can be converted to <Label>Text</Label>.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I want to change my ListBox DataSource by a button event,but Where page reload ,The listbox is empty,How to do?
|
|
|
|
|
Can u explain more?
Best Regards
3ala2
|
|
|
|
|
you should change property "AutoPostBack=Ture" in the listbox properties.
try it i think it helpful.
|
|
|
|
|
I test your tips, it still does not work,my code is here.
<br />
<br />
using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Data.OleDb;<br />
using System.Drawing;<br />
using System.Web;<br />
using System.Web.SessionState;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.HtmlControls;<br />
using WinPbMove;<br />
namespace WebPbMove<br />
{<br />
public class WebProdSelect : MetaBuilders.WebControls.DialogPage<br />
{<br />
protected System.Web.UI.WebControls.TextBox TextBox1;<br />
protected System.Web.UI.WebControls.Label Label1;<br />
protected System.Web.UI.WebControls.ListBox ListBox1;<br />
protected System.Web.UI.WebControls.Button cmdFilter;<br />
protected System.Web.UI.WebControls.Button cmdReturn;<br />
private PbMove dl = null;<br />
const string MYSTRING = "-------";<br />
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
string strSQL = "";<br />
if (!Page.IsPostBack)<br />
{<br />
if (dl == null)<br />
dl = new PbMove();<br />
if (dl.OpenConnection() == false)<br />
throw(new SystemException("Connect Oracle Failed!"));<br />
OleDbConnection cn = dl.Connection;<br />
<br />
if (TextBox1.Text == "")<br />
{<br />
strSQL = "Select t.prdct_name || '" + MYSTRING + "' || t.dscr From ip_prdct t";<br />
}<br />
else<br />
{<br />
strSQL = "Select t.prdct_name || '" + MYSTRING + "' || t.dscr From ip_prdct t"<br />
+ " Where t.dscr like '%" + TextBox1.Text + "%'";<br />
}<br />
OleDbDataAdapter adpter = new OleDbDataAdapter(strSQL,cn);<br />
DataSet ds = new DataSet();<br />
adpter.Fill(ds,"IP_PRDCT");<br />
DataTable dtProdct = ds.Tables["IP_PRDCT"];<br />
ListBox1.DataSource = dtProdct;<br />
ListBox1.DataTextField = dtProdct.Columns[0].ColumnName;<br />
ListBox1.DataValueField = dtProdct.Columns[0].ColumnName;<br />
ListBox1.DataBind();<br />
}<br />
}<br />
<br />
#region Web <br />
override protected void OnInit(EventArgs e)<br />
{<br />
InitializeComponent();<br />
base.OnInit(e);<br />
}<br />
<br />
private void InitializeComponent()<br />
{ <br />
this.cmdFilter.Click += new System.EventHandler(this.cmdFilter_Click);<br />
this.cmdReturn.Click += new System.EventHandler(this.cmdReturn_Click);<br />
this.Load += new System.EventHandler(this.Page_Load);<br />
<br />
}<br />
#endregion<br />
<br />
private void cmdFilter_Click(object sender, System.EventArgs e)<br />
{ <br />
if (dl == null)<br />
dl = new PbMove();<br />
if (dl.OpenConnection() == false)<br />
throw(new SystemException("Connect Oracle Failed!"));<br />
OleDbConnection cn = dl.Connection;<br />
<br />
string strSQL = "Select t.prdct_name || '" + MYSTRING + "' || t.dscr From ip_prdct t"<br />
+ " Where t.dscr like '%" + TextBox1.Text + "%'";<br />
OleDbDataAdapter adpter = new OleDbDataAdapter(strSQL,cn);<br />
DataSet ds = new DataSet();<br />
adpter.Fill(ds,"IP_PRDCT");<br />
DataTable dtProdct = ds.Tables["IP_PRDCT"];<br />
ListBox1.DataSource = dtProdct;<br />
ListBox1.DataTextField = dtProdct.Columns[0].ColumnName;<br />
ListBox1.DataValueField = dtProdct.Columns[0].ColumnName;<br />
ListBox1.DataBind();<br />
}<br />
<br />
private void cmdReturn_Click(object sender, System.EventArgs e)<br />
{<br />
string sRet = "";<br />
string str = ListBox1.SelectedItem.Text;<br />
int i = str.IndexOf(MYSTRING);<br />
if (i != -1)<br />
sRet = str.Substring(0,i).Trim();<br />
this.Close(sRet); <br />
}<br />
}<br />
}<br />
<br />
|
|
|
|
|
how can i call out values from .aspc after registering it to default.aspx
Kindly show with example
enjoy life like i do..
|
|
|
|
|
What is aspc?
Best Regards
3ala2
|
|
|
|