|
Hi Friends,
I am using a condition in aspx page(Inline C# code). Can anyone tell me whats the problem with the following code:
<%# if(Convert.ToString(DataBinder.Eval(Container.DataItem,"EventTo")) != ""){%>Hello<%}%>
Thanks for your help.
Sushant Duggal.
|
|
|
|
|
Try converting this to a function call. Something like:
string MyFunction(object o)
{
string eventTo = Convert.ToString(o);
if eventTo != ""
return "Hello"
else
return eventTo
}
Then your databinding expression can be:
<%# MyFunction(DataBinder.Eval(Container.DataItem, "EventTo")) %>
|
|
|
|
|
Sir,
How CLR(Comon languare runtime) manages the execution of code ?
Please help.
|
|
|
|
|
|
I m asp.net developer.I want to develop Mobile Application so i want to ask that whether we can convert our web application to Mobile apllication i.e they can be viewed on Mobile too or we have to go another way.Plz do provide me essential Links if there are.
Any help will be appreciated
varun
|
|
|
|
|
|
Sir,
Visual C# .NET may have a "power" features such as handling unmanaged code, and Visual Basic .NET may be skewed a little toward ease of use by providing features such as late binding
Can u please explain something about late binding and unmanaged code.
Thanks
|
|
|
|
|
wrong forum, try the .net forum
|
|
|
|
|
Hi
guys i want to apply validation in my application that when any user try to uploads the file greater then 1 MB, then that user should be notified on the client side and the file size checking should be done on the slint side too, how is it possible,plz reply me asap, thankx in advance.
|
|
|
|
|
I don't think it is possible to get the file size with client size scripts like javascript. Although if the user has allowed activex then there can be a possibility to get that.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thankx for ur reply, the problem i am facing is that, when the user uploads the file in my application greater then 4 MB , the white page "page of death comes in front of the user",i know this is the default limit of ASP.NET which can be increased too in web.comfig and machine.config, but i don't want it to increase the file uploading size limit in web.config or machine.config, what is the solution for this ASP.NET uploading problem,plz reply ASAP, thankx in advance.
|
|
|
|
|
Sir,
Can u please tell me something about the common language runtime.
Thanks
|
|
|
|
|
|
Sir,
I want to write some code on interfaces in vb.net
Please Help.
Thanks
|
|
|
|
|
this[^]
With Regards
Satips
|
|
|
|
|
Hi,
I'm trying to learn ASP.NET and Ajax. I´ve downloaded Atlas and read the excelent article "An Introduction to AJAX Techniques and Frameworks for ASP.NET" here on Code Project.
Now I want to modify the example so instead of getting the number of articles in stock, I want to display a picture of the article.
I started by modifiying the database and added a new colum(name: image, type: image) to the items-table. After that I created a new method in warehouse.cs, GetItemImage. This methos returns the image from teh database as a byte[].
But after that am I lost....any good ideas is appreciated!!!
Is it a good idea to a new .aspx-page that return the picture? If so, how to add it to the UpdatePanelExample2.aspx?
Please help a newbie.
/ Erik
|
|
|
|
|
You probably want to include another method that will stream the byte[] of the image to the browser. Suppose you create a page "GenerateImage.aspx" with these methods in it. You could then change the src attribute of an image in your UpdatePanel accordingly (to something like
GenerateImage.aspx?id=xxx<br />
<br />
Take a look at some of <a href="http://www.google.com/search?q=dynamic+asp.net+image&btnG=Search&hl=en&lr=&safe=off&c2coff=1" rel="nofollow">these links</a>[<a href="http://www.google.com/search?q=dynamic+asp.net+image&btnG=Search&hl=en&lr=&safe=off&c2coff=1" target="_blank" rel="nofollow">^</a>].
|
|
|
|
|
Hi all
Iwant to wrie a program to deal with online survey using asp.net and oracle.
My first question is how to connect to the database?(it would be better if you give my the code).
My second question is relative to the survey it self,i want to know how many one answer female for the question what is your genedr? ,For example.In another way number of people who answer specific question.
Thanks alot.
|
|
|
|
|
Sure. What have you tried so far?
|
|
|
|
|
|
Sir,
How can i delete the history programically in vb.net 1.1.
please help.
|
|
|
|
|
Sir,
There is a button in the form and the focus is already set on the button.There are few lines of code written on button click.Now the problem is if u press the enter key I don't want to execute the code written on button click.
Please help.
Thanks
|
|
|
|
|
Hi there,
Try with 'Command' event of the button control. It fired after the button is clicked, BUT you you can control it using 'CommandName' & 'CommandArgument' property.
Regards,
Jay
|
|
|
|
|
Sir,
I have gone through ur suggestion.Now the problem is I want to stop the execution of the lines on pressing the enter key.
Thanks
|
|
|
|
|
Hi,
In the Command event handler, you can check for the CommandName using any conditional statment like if in C#.
If the condition is satisfied, then you can execute your block of code , otherwise, you may simply leave the block from execution.
protected void Button1_Command(object sender, CommandEventArgs e)<br />
{<br />
if(e.CommandName=="btn1")<br />
{<br />
block of code<br />
} <br />
}
Here btn1 is the CommandName of the Button1.
If this soln is not clarifying your problem, you may expain your problem more clearly ( WHY you need to perform this?).
(I think, you are a student or Fresher to DotNet. Kindly refer a book for this kind of theoretical question you have posted today.)
Regards,
Jay
|
|
|
|