|
Hi,
dim strExp as string
strExp = "HRA + iif(Basic > 2000), 3000, 4000)"
am assign value to the string
strExp = "2000 + iif( 3000> 2000), 200,500)"
strExp has to return value, but its return the same string.....
am trying to convert to integeer am getting exception...
how to do this andto get the value of the iif condition
plz answer me if anyone knows..
regards,
kannak......
kannak
|
|
|
|
|
do like
strExp = HRA + CInt(IIF(Basic > 2000,3000,4000))
I think the Quote mark is the culprit..
|
|
|
|
|
Are you making the assumption that an expression is being resolved when you assign a string literal to a variable? Wrong assumption.
You're getting the error because the string literal "2000 + iif..." is no more numeric than the string literal "hello world". In your example, are "Basic" and "HRA" variables?
|
|
|
|
|
environment: vb .net (v2+, no v3 support yet here on production machines)
I need to be able to display an html physcial file as a thumbnail on a web page. I can't put my finger on an easy solution. If I have to convert it to an image (bmp, jpg, etc), I don't want to do it as it adds too much overhead to the process. I would rather just throw a new browser up and display the whole doc instead.
I need to write code that produces as little overhead as possible. I just can't see the path to the end of this without a conversion in the middle. Is there one?
Why: We produce (some) documents via an XML translation to html (via XSLT). The output is written and stored in a physical file location (for later use). The user is allowed to FAX the document where we pull the file from the drive, attach the doc as a file to email and send it along to our fax server as an attachment. That all works great already. But I wanted to display what is going to be faxed on the web page as a thumbnail before sending the doc.
|
|
|
|
|
There's no way without some overhead that I know of.
I would be tempted to use the WinForms WebBrowser control behind-the-scenes for something like this, utilizing its DrawToBitmap method.
|
|
|
|
|
well, there is no easy means to make a thumbnail of an entire page with the exact layout. If you can create a mini version of the same web page, u can load that in an IFrame.
Generally what most of the websites do, is just show a small thumbnail picture of the site and place in the site.
I dont think there is any possible way other than this. If so, I would love to see them.
|
|
|
|
|
Can any one tell me how to do Unit testing in Asp.net MVC Application....i am new to MVC and learning the MVC so dont hav much idea abt that.......i treid to search in google also.....but i dont know the basic thing og unit testing so dont get idea from that......
Thanx in Advance....
|
|
|
|
|
|
Thanx for this video.......its really helpful......
Do u have more video links or articles for that????
|
|
|
|
|
vid nandha wrote: Do u have more video links or articles for that????
ASP.NET MVC Videos
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
How to change the image of the clicked image button in a gridview.
Thankyou
|
|
|
|
|
yesu prakash wrote: How to change the image of the clicked image button in a gridview.
In RowCommand Event, find the Image control and change the image path and then Bind the Grid Again
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
In the event:
ImageButton ib = (IMageButton)sender;
if (ib.ImageUrl.Equals(/* yourcurrentImageButtonUrl here */))
ib.ImageUrl = /* NewImageButtonUrl */
Rebind your grid again
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
While Posting/Replying, Please Make sure you are replying to correct post. Just because of if your answer is correct he will not aware of it unless he check all the thread. Some times user check Email on to received email for any answer, in this he will not even get the email too.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
yaah Jeet..
Its true. I agree.
|
|
|
|
|
Hi there,
When i run my website it only says "Website found. Waiting for reply" and it does this non stop even when the Progress bar is complete. It seems to me that it cannot debug the application.
I have used UpdatePanels normal panels and scriptManagers at the top. But when i run it,it continues to say connecting. This is for the first time i encounter this sort of problem and i really need to debug and get the website running.
Please give suggestions, your help is very much appreciated.
Thanks
allphpro
|
|
|
|
|
Your site is hosted on IIS or you are trying to debug from Visual Studio?
AllPhee wrote: I have used UpdatePanels normal panels and scriptManagers at the top. But when i run it,it continues to say connecting. This is for the first time i encounter this sort of problem and i really need to debug and get the website running.
Did you try to check it with break point?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
MAN, You are a Genius WOW.
In fact the application was just looping non stop on the masterpage code.
my code was like this
Try
Dim dvLoggedUser As dataview = CType(sdsGetUser.Select(DataSourceSelectArguments.Empty), DataView)
If dvLoggedUser.Table.Rows.Count > 0 Then
lblUser.Text = (dvLoggedUser(0)("Name"))
End If
btnLogout.Visible = True
Catch ex As Exception
'When it gets here it looped back to the top because the Login page used the same master page
Response.Redirect("Login.aspx")
End Try
Because i am using the same masterpage for My login Page and all other pages and trying to redirect to the login page if the user does not exist, therefore it loops infinitely in this regard.
Abhijit you are a Genius. Thanks a million.
I had forgotten about this technigue
allphpro
|
|
|
|
|
Cool. Then you should Marked that Answer as Good Answer, it lets us and people reading the forums know if our answers are any good
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hello everyone,
Can anybody please tell me,what is the proper way of applying a theme to the Master page.
Instead of setting the theme attribute of every page ,I did it by writing
<pages theme="Theme"></pages>
in the web.config & it worked fine, but I want to use theme in master page.Any suggestions?
|
|
|
|
|
specify the Theme in web.config.
no need to specify for each page including MasterPage
<pages theme="themeName"></pages>
|
|
|
|
|
Thanx for your reply.
I have done the same thing & it is working also.
But can't I set the theme in master page?
|
|
|
|
|
anada8886 wrote: But can't I set the theme in master page?
Apply the Theme in Page_PreInit( ) Event of your Default.aspx (Home) Page.
protected void Page_PreInit(object sender, EventArgs e)
{
Page.Theme = "Theme1";
}
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thank you sir,but I wanted it on master page so that I don't need to make changes in each and every page.
|
|
|
|
|
No you can not specify a theme in master page .
if you don't to specify a theme in web.config then
you have to specify in each page for which you want to apply them.
|
|
|
|