|
I recommend you do some reading on ASP.NET. Basically, just because the IDE doesn't show you an event, doesn't mean it doesn't exist, it just doesn't exist on the server side. You can add an onblur to a textbox, and it will be passed to the client and work perfectly.
Your next problem is getting the cliend side Id of your textboxes. This is represented by the ClientID property of your server control. You need to write that to the client, either inline in your script, or as script that creates js variables you can use. Also never call document.getElementById and assume it returns something, add a step that checks it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
how to get the Process name which is accesing/ using my file. I want to get the process name which is reading my file using web application
Thanks in advance
|
|
|
|
|
What you want is impossible. A web app runs in the browser, and cannot enumerate processes on the local machine. Why would you want to do that ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have the following code:
When it runs I get the error:
<b>System.InvalidCastException: Specified cast is not valid.</b>
chkIgnore = a checkbox
Ignore = a field in a database type nvarchar size 1, can either have Y or N in the column
If anyone can help that would be great, bit stuck on this one.
thanks!
protected void OnRowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
bool ignore_box = true;
if (DataBinder.Eval(e.Row.DataItem, "Ignore") != null)
{
if (DataBinder.Eval(e.Row.DataItem, "Ignore").ToString() != "Y" || DataBinder.Eval(e.Row.DataItem, "Ignore").ToString() != "N")
{
ignore_box = (bool)DataBinder.Eval(e.Row.DataItem, "Ignore");
}
if (ignore_box == true)
{
((CheckBox)e.Row.FindControl("chkIgnore")).Checked = true;
}
}
}
}
|
|
|
|
|
.netman wrote: DataBinder.Eval(e.Row.DataItem, "Ignore")
You're calling this method three times because...... ????
.netman wrote: Ignore").ToString() != "Y"
.netman wrote: (bool)DataBinder.Eval(e.Row.DataItem, "Ignore");
You're assuming because the the field is not a string starting with Y or N ( and not y, n, t, T, F, f, or any other letter or character ), it must be a bool. Either your data source is seriously messed up, or your understanding of how this works is. Judging from the error message you're getting, I'd say the latter. You can't just convert anything to a bool, it has to be a bool. It's obviously not. At a minimum, you should put this code in a try/catch, and then set a default. Probably, you should replace it with a default.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I managed to sort it
The database field was set as nvarchar so I changed it to bit.
Then I changed or the N and Y to 0 and 1
Its all working now!
Its always better when you fix it yourself
|
|
|
|
|
Yeah, doing it right in the first place helps
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
but if i did that I wouldnt get such great answers from people like yourseleves!
|
|
|
|
|
*grin*
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anyone have any idea how I can set a transparency key for an image (Most likely white or, my favourite, Fuschia) - Normal C# has the .MakeTransparent(Color.Fuschia);, yet the ASP.NET Image boxes seem to lack the method...
I have code to pretty much create small images over a large image, which are being loaded from the web, and they're not exactly square, and these random white boxes are... disorienting
Maybe a way to customise a .jpg to be transparent by default, and THEN upload it... ?
Any help would be GREATLY appreciated!
- Reelix
|
|
|
|
|
I believe that later versions of IE support transparency in PNG images.
Also, ASP.NET is constrained by what HTML allows.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Well, it seemed it needed an actual transparency settings.
Paint.NET's transparency function worked wonders
Thanks anyways
- Reelix
|
|
|
|
|
My web site uses PayPal for payment, but problem is how the server is notified of all payments as they happen.bcos paypal simply redirect back to yrs page back once payment is done .So how i will update all these transection to my server
Plz help Me
Raghvendra
|
|
|
|
|
check this out, might help
http://www.codeproject.com/KB/aspnet/UsePayPalPaymentInASPNET.aspx
|
|
|
|
|
Hi all
i was downloaded the mathml control and alrady added on my page for entring mathmatics equations on my webpage, its woking fine but i have no knowledge how to use that control. I want to save that equation into the database and use that for displaing also but i dont know how to do the same.
Plz do reply
Yogesh Agarwal
|
|
|
|
|
If the control is a CP article, ask in the forum provided by the article. If not, look for a forum where you downloaded the article. Most people here will not have used it, so how can we help ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for the reply, i am also looking for the same but i didn't find any fourm could you give me some links where i could read the article.
or
plz tell me only how could we use the addtional controls in our asp.net pages which are downloaded from web. i tried to use others also (other than mathml) it gives me the error as follows
Error 1 The type 'System.Windows.Forms.UserControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. E:\projects\mathtype\Default.aspx.cs 24 9 E:\projects\mathtype\
you just help me to remove the same rest i tried to search by other resources.
thanks again for reply.
with regards
Yogesh Agarwal
|
|
|
|
|
Ah - the problem is that you're trying to use a windows control in a web application. You can't do that.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hai i use ,
TextBox1.Text = "This is a test.";
string find = TextBox2.Text;
string repalace = TextBox3.Text;
myString = Regex.Replace(TextBox1.Text , find, repalace);
TextBox4.Text = myString;
it is only replace runtime but i want to replace
<title>hai
replace---->
<title>buy
so if you know the answer replay to me....
|
|
|
|
|
so u want to change page title at runtime...?
Ashish Sehajpal
|
|
|
|
|
hai,
not one title Suppose i use
function call()
{
var name='suguna';
}
it is a aspx page html code.for example the word call() is change to string().it is possible.if u know the code replay to me...
|
|
|
|
|
http://www.builderau.com.au/program/asp/print.htm?TYPE=story&AT=339286810-339028371t-320002001c[^]
First google hit. You can use a literal to set the header.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thank to you. but i want
not one title Suppose i use
function call()
{
var name='suguna';
}
it is a aspx page html code.for example the word call() is change to string().it is possible.if u know the code replay to me...
|
|
|
|
|
Did you read the article ? Once you have a literal, you can change the title in code, anywhere you like.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
if one needs to change the value in HTML (as he is asking) one can use javascript and search for the the particular TAG (<title> in this case) ans set its innerTEXT / innerHTML as per requiremnet.
try to use javascript ... it is bit easier solution for your problem without implementing anycode in CODE BEHIND
cheers !
<div class="ForumSig">Ashish Sehajpal
</div>
|
|
|
|