|
It's the IndexOf method on the string class.
However, be warned that result is 0-based while the legacy VB method is 1-based.
David Anton
http://www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
C++ to VB Converter: converts C++ to VB
C++ to Java Converter: converts C++ to Java
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
Hi All,
I have used CodeDOM in .net to auto-generate C# code, which in essence generates a class file having a class along with its member fields, methods and properties.
However, i don know how to generate the following line of code:
private const string NAME = "CSharp";
Here, i have a generate a CodeMemberField which is a constant string with a private specifier as shown above.
Please send me the sample code which would help me to auto-generate the above line of code.
|
|
|
|
|
hi,
in my asp.net web application, I insert, update and delete records in an access database..I do that by creating a connection, an adaptor and so on everytime I wanna do any of these things...is there a better way to do these functions without doing this everytime. what's the best way to handle database transactions in my web application in order to make the application faster and optimize its performance??
|
|
|
|
|
Dear all,
I am using asp.net , C# , sql 2005.
I would like to present column wise detail(like gridview present row wise presentation). I manipulate my query to show three column per row (using cursor).
As my query is dynamic I decide at run time which field to show.
Please give me some idea like which web control I use to show column wise record in dynamic case.
Please guide me
thanks
imaran khan
|
|
|
|
|
Hi friends
what is sqldependency?
regards
saravan
|
|
|
|
|
|
I am storing images into database using serialization. while displaying those images into gridview control how to assign them to image button of gridview control?
|
|
|
|
|
I think you need to first convert them bitmap or similar to that you can't aasign directly yo any control first convert them stream into some meaning full image type
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Thanx..do u have any url for dis?
|
|
|
|
|
|
Hi,
Can any one tell me how to export data from gridview to pdf?
I have tried with the following piece of code:
Response.ClearContent();
Response.AddHeader("content-disposition", "attachment; filename=Report.pdf");
Response.ContentType = "application/pdf";
StringWriter objStrWriter = new StringWriter();
HtmlTextWriter objHtmlTxtWriter = new HtmlTextWriter(objStrWriter);
grdvwReport.RenderControl(objHtmlTxtWriter);
Response.Write(style); // Set the currency columns style
Response.Write(objStrWriter.ToString());
Response.End();
But while opening the pdf iam geeting the follwing message:
AdobeReader could not open 'Report[1].pdf' because it is either not a supported file type or because the file has been damaged.
Please try to help me...
Thanks in advance
Sumithra
|
|
|
|
|
|
Hi,
I have already tried with that code.But while opening iam getting the error. Is there any other way to convert data from gridview to pdf?
Thanks
|
|
|
|
|
Hi
i read the html code and html controls into one protected string, i put that server tag into html source. but my problem is i am not able to finding html controls . this is my code
For cnt = 0 To listofobj.Count - 1
If listofobj(cnt).MNU_Imgpath = "" Then
listofobj(cnt).MNU_Imgpath = "Noimg.jpg"
End If
Dim dupchk As Boolean = dupeliminate(listofobj(cnt).MNU_MenuID)
If dupchk = True Then
str &= ""
str &= "" & vbCrLf
str &= " " & vbCrLf
str &= listofobj(cnt).MNU_MenuName
str &= " " & vbCrLf
str &= " " & vbCrLf
End If
str &= "" & vbCrLf
str &= "" & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= "" & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " "
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= "" & vbCrLf
str &= " " & vbCrLf
str &= " | " & vbCrLf
str &= " " & vbCrLf
str &= " | " & vbCrLf
str &= " " & vbCrLf
str &= " " & listofobj(cnt).MNU_ItemName & "
" & vbCrLf
str &= " " & listofobj(cnt).MNU_Desc & "
" & vbCrLf
str &= " Item Availabale From" & listofobj(cnt).MNU_StartTime & " to " & vbCrLf
str &= " " & listofobj(cnt).MNU_EndTime & ""
str &= " | "
str &= " " & vbCrLf
str &= " Price:" & listofobj(cnt).MNU_Price & " " & vbCrLf
str &= " | " & vbCrLf
str &= " Quantity:" & vbCrLf
str &= " " & vbCrLf
str &= " 1" & vbCrLf
str &= " 2" & vbCrLf
str &= " 3" & vbCrLf
str &= " 4" & vbCrLf
str &= " 5" & vbCrLf
str &= " 6" & vbCrLf
str &= " 7" & vbCrLf
str &= " 8" & vbCrLf
str &= " 9" & vbCrLf
str &= " 10" & vbCrLf
str &= " 11" & vbCrLf
str &= " 12" & vbCrLf
str &= " 13" & vbCrLf
str &= " 14" & vbCrLf
str &= " 15" & vbCrLf
str &= " 16" & vbCrLf
str &= " 17" & vbCrLf
str &= " 18" & vbCrLf
str &= " 19" & vbCrLf
str &= " 20" & vbCrLf
str &= " " & vbCrLf
str &= " | " & vbCrLf
str &= " | " & vbCrLf
str &= ""
Next
this string results a grid view format table.
grid view not satisfy my requirement because i want full rows in middle.
the tag is running good showing the items properly. but when i click add the item to cart. i need to be find the html controls which i written in server tag. but i am not able to find it.
dim itemid as new htmlinputcheckbox
itemid = ctype(page.findcotrol("enabled0"),htmlinputcheckbox)
the itemid showing nothing eventhough i have that control....... why ???
is there any other procedure to find the dynamic html control rather than the page.findcontrols...........
example:
pizza
----------------------------------
pizzaimg1 description cost quantity
pizzaimg1 description cost quantity
pizzaimg2 description cost quantity
pizzaimg3 description cost quantity
salad
pizza
----------------------------------
salad1 description cost quantity
salad2 description cost quantity
salad3 description cost quantity
like so on ................
i am assigning the source as array list with generic list of(...)
Hope that any body help me...........
This is haneef.............................................................
This is haneef.............................................................
|
|
|
|
|
This is an absolute mess.
If you don't like how the grid view renders your data, try using a repeater, which allows you to format your data any way you like.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
i read the html code and html controls into one protected string, i put that server tag into html source. but my problem is i am not able to finding html controls . this is my question
For cnt = 0 To listofobj.Count - 1
If listofobj(cnt).MNU_Imgpath = "" Then
listofobj(cnt).MNU_Imgpath = "Noimg.jpg"
End If
Dim dupchk As Boolean = dupeliminate(listofobj(cnt).MNU_MenuID)
If dupchk = True Then
str &= ""
str &= "" & vbCrLf
str &= " " & vbCrLf
str &= listofobj(cnt).MNU_MenuName
str &= " " & vbCrLf
str &= " " & vbCrLf
End If
str &= "" & vbCrLf
str &= "" & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= "" & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " "
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= " " & vbCrLf
str &= "" & vbCrLf
str &= " " & vbCrLf
str &= " | " & vbCrLf
str &= " " & vbCrLf
str &= " | " & vbCrLf
str &= " " & vbCrLf
str &= " " & listofobj(cnt).MNU_ItemName & " " & vbCrLf
str &= " " & listofobj(cnt).MNU_Desc & " " & vbCrLf
str &= " Item Availabale From" & listofobj(cnt).MNU_StartTime & " to " & vbCrLf
str &= " " & listofobj(cnt).MNU_EndTime & ""
str &= " | "
str &= " " & vbCrLf
str &= " Price:" & listofobj(cnt).MNU_Price & " " & vbCrLf
str &= " | " & vbCrLf
str &= " Quantity:" & vbCrLf
str &= " " & vbCrLf
str &= " 1" & vbCrLf
str &= " 2" & vbCrLf
str &= " 3" & vbCrLf
str &= " 4" & vbCrLf
str &= " 5" & vbCrLf
str &= " 6" & vbCrLf
str &= " 7" & vbCrLf
str &= " 8" & vbCrLf
str &= " 9" & vbCrLf
str &= " 10" & vbCrLf
str &= " 11" & vbCrLf
str &= " 12" & vbCrLf
str &= " 13" & vbCrLf
str &= " 14" & vbCrLf
str &= " 15" & vbCrLf
str &= " 16" & vbCrLf
str &= " 17" & vbCrLf
str &= " 18" & vbCrLf
str &= " 19" & vbCrLf
str &= " 20" & vbCrLf
str &= " " & vbCrLf
str &= " | " & vbCrLf
str &= " | " & vbCrLf
str &= ""
Next
this string results a grid view format table.
grid view not satisfy my requirement because i want full rows in middle.
example:
pizza
----------------------------------
pizzaimg1 description cost quantity
pizzaimg1 description cost quantity
pizzaimg2 description cost quantity
pizzaimg3 description cost quantity
salad
pizza
----------------------------------
salad1 description cost quantity
salad2 description cost quantity
salad3 description cost quantity
like so on ................
i am assigning the source as array list with generic list of(...)
Hope that any body help me...........
This is haneef.............................................................
|
|
|
|
|
Hi,
We have a requirement for creating automated test scripts for an asp.net web application which in turn has many middleware calls which will be accessing Session objects.
Can anyone give us an idea of how to get Session related details when writing test scripts.(Authentication mode used is Windows). We are planning to use Nunit framework for writing test scripts. Database used for the project is SQL Server.
We got to know that HttpSessionState or HttpContext can be used for getting session details. But can anyone provide more details on how to use this.
Regards,
|
|
|
|
|
Hi,
I am in the midst of deciding whether to populate my treeview using XML or from database. Here is my scenario.
All my nodes are quite static, except one node.
This node is call Hand Book, the second level will be Company Name, then the third level would be the Sub-Category of the HandBook. Praticaly the Tree is to store HandBook from a few Company.
Example:
> Hand Book
--> XYZ Limited
----> Dress Code
----> Leave Entitlement
User usually will add, delete or update the Company Name node or the HandBook Sub-Category Node.
The HandBook Sub-Category Node when clicked, it should open using Microsoft Word. (Or should I open in aspx, because I was wondering would it be a problem that the system need to create a new aspx file whenever user add a new sub-category).
So, I need to know how to go about this either using XML or Database to populate the Treeview, need some guidance here on how do I populate it and the best way to populate the tree view.
Thanks in advance.
J Liang
J Liang
|
|
|
|
|
Is there any way to trace browser back button click, Please help me.
Thanks
Mohamed
|
|
|
|
|
You mean you wanna trace the history of how many time user click "Back" button?
Why do you wanna do that?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi all,
When i installed the application on windows server 2003, all buttons (server control) didn't react when i clicked them. But when i installed the application on windows XP, the application was running nornally, everything was just fine.
I don't know what problem is. Did i miss something. Hope you help me to firgure it out.
Thanks so much
|
|
|
|
|
This is common problem. You need to enable the ASP.NET in IIS.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I have setup a insert command that includes a dollar value like so:
VPODS.InsertCommandType = SqlDataSourceCommandType.Text
VPODS.InsertCommand = "INSERT INTO [VPO] ([OrderDate], [Project], [Supplies], [NoExceed])VALUES (@OrderDate, @Project, @Supplies, @NoExceed)"
VPODS.InsertParameters.Add("OrderDate", Now())
VPODS.InsertParameters.Add("Project", Project)
VPODS.InsertParameters.Add("Supplies", TypeCode.Boolean, Supplies)
VPODS.InsertParameters.Add("NoExceed", TypeCode.Decimal, NoExceed)
rowsAffected = VPODS.Insert()
It is posting to an Access DB and the NoExceed file is of DataType Dollar.
I get an error when I post and I know its the dollar field causing the problem. Got any suggestions?
Thanks for any help
|
|
|
|
|
williammcq wrote: VPODS.InsertParameters.Add("NoExceed", TypeCode.Decimal, NoExceed)
If the datatype of NoExceed is "Dollar", Why don't you use "Currency"?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Currency is not a member of System.TypeCode
|
|
|
|