|
Hello all,
I want to insert a Hindi text value into a mysql5.1 database from an asp.net TextBox when a "INSERT" button is clicked. And I also want to retrive the same value from MySql5.1 to an asp.net TextBox when a "SHOW" button is clicked. Please help me how this will be possible. I am using Visual Studio 2005 and C# for code behind.
Thanks in advance
|
|
|
|
|
hi friends
In asp 2.0,we have File upload control,In this control allow to upload the multiple file (If you browse the button,Upload window will be open and select the multiple file into upload window..finally we upload the file)
In asp 1.1 ,we have html file upload control,here i need to open the upload window and select multiple file into upload window..finally upload the all the files..
but asp1.1,select single file only into upload window..i need to select more file into upload window
Is it possible?
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
Select File one by one using File Upload Control. Put a Add button on the form, OnClick of the Add button, add the file in a listbox. Add multiple file , then click on upload button to upload file taking the list from Listbox.
|
|
|
|
|
Exception Details: System.Web.HttpException: Request timed out.
I am using ReportViewer control.I have only problem in Exporting in PDF format.
I have made setting in web.config like
httpRuntime executionTimeout="900" in system.web tag
Also I have checked many attributes like sessionState,httpRuntime,httpCookies in web.config file. And also checked values for server.Scripttimeout.
Please tell me which setting can cause error while exporting the reports.
|
|
|
|
|
What is the report processing mode? Local or remote?
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
hiiiiiiii
i m using asp.net using c# i want to put numeric value in textbox and it will convert in to word,as i put 234 in textbox and it will convert in to two hundred thirty four.
plese help me
thanks in advance
|
|
|
|
|
|
This[^] will tell you everything you need to know.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
prateekfgiet wrote: want to put numeric value in textbox and it will convert in to word,as i put 234 in textbox and it will convert in to two hundred thirty four
So, what is your problem? Did you tired any thing?
|
|
|
|
|
ya i have tried a code but when code runs it will give error
code is :
string Number;
string deciml;
string _number;
string _deciml;
string[] US = new string[1003];
string[] SNu = new string[20];
string[] SNt = new string[10];
protected void Page_Load(object sender, EventArgs e)
{
Initialize();
}
public string NameOfNumber(string Number)
{
string GroupName = "";
string OutPut = "";
if ((Number.Length % 3) != 0)
{
Number = Number.PadLeft((Number.Length + (3 - (Number.Length % 3))), '0');
}
string[] Array = new string[Number.Length / 3];
Int16 Element = -1;
Int32 DisplayCount = -1;
bool LimitGroupsShowAll = false;
int LimitGroups = 0;
bool GroupToWords = true;
for (Int16 Count = 0; Count <= Number.Length - 3; Count += 3)
{
Element += 1;
Array[Element] = Number.Substring(Count, 3);
}
if (LimitGroups == 0)
{
LimitGroupsShowAll = true;
}
for (Int16 Count = 0; (Count <= ((Number.Length / 3) - 1)); Count++)
{
DisplayCount++;
if (((DisplayCount < LimitGroups) || LimitGroupsShowAll))
{
if (Array[Count] == "000") continue;
{
GroupName = US[((Number.Length / 3) - 1) - Count + 1];
}
if ((GroupToWords == true))
{
OutPut += Group(Array[Count]).TrimEnd(' ') + " " + GroupName + " ";
}
else
{
OutPut += Array[Count].TrimStart('0') + " " + GroupName;
}
}
}
Array = null;
return OutPut;
}
private string Group(string Argument)
{
string Hyphen = "";
string OutPut = "";
Int16 d1 = Convert.ToInt16(Argument.Substring(0, 1));
Int16 d2 = Convert.ToInt16(Argument.Substring(1, 1));
Int16 d3 = Convert.ToInt16(Argument.Substring(2, 1));
if ((d1 >= 1))
{
OutPut += SNu[d1] + " hundred ";
}
if ((double.Parse(Argument.Substring(1, 2)) < 20))
{
OutPut += SNu[Convert.ToInt16(Argument.Substring(1, 2))];
}
if ((double.Parse(Argument.Substring(1, 2)) >= 20))
{
if (Convert.ToInt16(Argument.Substring(2, 1)) == 0)
{
Hyphen += " ";
}
else
{
Hyphen += " ";
}
OutPut += SNt[d2] + Hyphen + SNu[d3];
}
return OutPut;
}
private void Initialize()
{
SNu[0] = "";
SNu[1] = "One";
SNu[2] = "Two";
SNu[3] = "Three";
SNu[4] = "Four";
SNu[5] = "Five";
SNu[6] = "Six";
SNu[7] = "Seven";
SNu[8] = "Eight";
SNu[9] = "Nine";
SNu[10] = "Ten";
SNu[11] = "Eleven";
SNu[12] = "Twelve";
SNu[13] = "Thirteen";
SNu[14] = "Fourteen";
SNu[15] = "Fifteen";
SNu[16] = "Sixteen";
SNu[17] = "Seventeen";
SNu[18] = "Eighteen";
SNu[19] = "Nineteen";
SNt[2] = "Twenty";
SNt[3] = "Thirty";
SNt[4] = "Forty";
SNt[5] = "Fifty";
SNt[6] = "Sixty";
SNt[7] = "Seventy";
SNt[8] = "Eighty";
SNt[9] = "Ninety";
US[1] = "";
US[2] = "Thousand";
US[3] = "Million";
US[4] = "Billion";
US[5] = "Trillion";
US[6] = "Quadrillion";
US[7] = "Quintillion";
US[8] = "Sextillion";
US[9] = "Septillion";
US[10] = "Octillion";
}
protected void Button1_Click(object sender, EventArgs e)
{
string currency = "Rupees ";
string _currency = " Paise Only";
if (Convert.ToDouble(TextBox1.Text) == 0)
{
TextBox2.Text = "Null Value";
return;
}
if (Convert.ToDouble(TextBox1.Text) < 0)
{
TextBox2.Text = "Invalid Value";
return;
}
string[] no = TextBox1.Text.Split('.');
if ((no[0] != null) && (no[1] != "00"))
{
Number = no[0];
deciml = no[1];
_number = (NameOfNumber(Number));
_deciml = (NameOfNumber(deciml));
TextBox2.Text = currency + _number.Trim() + " and " + _deciml.Trim() + _currency;
}
if ((no[0] != null) && (no[1] == "00"))
{
Number = no[0];
_number = (NameOfNumber(Number));
TextBox2.Text = currency + _number + "Only";
}
if ((Convert.ToDouble(no[0]) == 0) && (no[1] != null))
{
deciml = no[1];
_deciml = (NameOfNumber(deciml));
TextBox2.Text = _deciml + _currency;
}
}
and error is:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
Source Error:
Line 166: }
Line 167: string[] no = TextBox1.Text.Split('.');
Line 168: if ((no[0] != null) && (no[1] != "00"))
Line 169: {
Line 170: Number = no[0];
|
|
|
|
|
Wow - what a world of ugliness. Have you stopped to read the error message, and consider what it might mean ? Have you stepped through the code ?
If you're taking a class, you need to talk to your teacher, you are lost. If you're teaching yourself, buy a book on C# and read it carefully.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
prateekfgiet wrote: System.IndexOutOfRangeException: Index was outside the bounds of the array.
Error clearly says that the value of array is going to outside the boundary. So, Put a breakpoint over there and check the array index.
|
|
|
|
|
You are trying to access an item index which does not exist in the array. As Abhijeet rightly said, putting breakpoints and debugging it can track the issue and take you to the resolution.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
i have put break point, when control reach
if ((no[0] != null) && (no[1] != "00"))
it gives error
how can i remove this error pls tell me
i m totally exhaust.
pls help me
|
|
|
|
|
ok thanks i got solution
thanks
|
|
|
|
|
May be no[1] != "00" is giving error because you are not checking for the null value.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
yea due to null value its give error.
thanks
one more problem is here
when i put 223456.00, it converts in to Rupees Two hundred Twenty Three Thousand Four hundred Fifty Six Only while it should be rupees two lac twenty three thousand four hundred fifty six only
pls help me about this
|
|
|
|
|
Hi,
It's tough to answer this question as debugging is the only way. So, I think you are missing some checks (I mean some condition is getting failed) which cause a wrong sentence. This is my guess which came from my previous experience. I also had a similar kind of problem like yours. But one thing only I can remember is the condition checking. So try to debug and check all consitions in your code. All the best.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
ok
thanks a lot for the help
|
|
|
|
|
prateekfgiet wrote: when i put 223456.00, it converts in to Rupees Two hundred Twenty Three Thousand Four hundred Fifty Six Only while it should be rupees two lac twenty three thousand four hundred fifty six only
Debugging is the only one way to resolve your problem. Check the condition properly.
|
|
|
|
|
when you "Publish" a website from VS, what exactly does it do then copying files over from project dir to IIS wwwroot virtual directory designated?
Thanks
dev
|
|
|
|
|
I suspect that's about it, unless it also changes some IIS settings to create a site at your root directory.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
Thanks - for those who're looking for same answer, this link from saanj is good.
dev
|
|
|
|
|
I am very glad to know that the link was useful to you.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|