|
I am trying to create advanced search page where a user can select values from multiple dropdown controls. There is a stored procedure that will take the selected values from dropdown boxes using coalesce. I was able to configure it so the data fromdropdown boxes is read from SQL Express 2005 database and available for selection from drop-down boxes. I created a "Search" button that will submit these selected vaules from multiple dropdown boxes and submit these to store procedure. After user clicks on a search button the data is supposed to be displayed in a data grid. Can someone help me how to program Button logic for this? So a click on a search button dispalys the "found" data in a grid? This is what i have now:
None of these 2 alternative will fire.. I have SqlDataSource1 throygh SqlDataSorce6 for dropdown boxes.
protected void Button1_Click(object sender, EventArgs e)
{
gridDataSource.Select(DataSourceSelectArguments.Empty);
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlDataSource1.Select(DataSourceSelectArguments.Empty);
}
|
|
|
|
|
Hi,
How do I allow users to enter their username and password into the Address bar as a sring rather than having them enter the information directly into a form?
http://www.site.com/login.aspx?user=Fred&pass=George
Thanks,
Ash
|
|
|
|
|
ednet2006 wrote: How do I allow users to enter their username and password into the Address bar as a sring rather than having them enter the information directly into a form?
That really is not a good idea.
|
|
|
|
|
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.
|
|
|
|