|
|
I developed an application that connects to a MySQL database using a web service coded in c#. The prototype of the web service was developed with VS2003. The prototype worked great.
I completed the web service functionality after upgrading to VS2005. My remote host does not support .NET 2. How can I build the web service as a .NET 1.0 web service from VS2005?
|
|
|
|
|
This is not possible as of now. Sorry.
|
|
|
|
|
[Reference ERROR: Object does not contain the definition for method /property]
Avoid naming conflict in ASP.NET [2.0]
I found this while developing three tire ASP.NETbase web application.
Suppose you have a class library in the same solution as your web app. Name the class library as ReferMe and rename the class in it as Getit [see the following code]
using System;
using System.Collections.Generic;
using System.Text;
namespace ReferMe
{
public class Getit
{
public string Name()
{
return "this is a test";
}
}
}
Build this class project [class library].
Now add its refrence in your web project [using add reference /project]. Import this library in default.aspx.cs code behind file [see the following code]
using ReferMe;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Getit g = new Getit();
Response.Write(g.Name());
}
}
This code will work and default.aspx will show "this is test” in browser.
Now add another page to the same web project as Getit.aspx. and change the code behind file [see the following code]
public partial class Getit : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Done");
}
}
Now if you try to run the default.aspx [view it in browser] – following error message will pop up
in default.aspx.cs : Getit does not contain the definition for Name [i.e. g.Name() will not work]. If you comment out following lines in default.aspx.cs i.e. code behind for the default.aspx
using ReferMe;
Response.Write(g.Name());
Default.aspx will build successfully. [Please note that code line Getit g = new Getit(); is not an error]This is weird but true.
What is happening is that the public partial class Getit defination [in Getit.aspx.cs] is conflicting with ReferMe.Getit class in ReferMe class library. This error can be resolved by either changing Getit.aspx to Getit1.aspx or ReferMe.Getit to ReferMe.Getit1
So be careful in naming your webpage and classes in your class library projects.
-- modified at 19:57 Monday 11th September, 2006
|
|
|
|
|
Hello,
I need to be able to remove the header and footer from IE programatically. I KNOW THAT YOU CAN REMOVE THEM BY GOING INTO PAGE SETUP.
I have an invoice and i do not want the header and footer on the page. Also, is there an easy way to control the margins as well?
Thanks
Steve-o H.
There are 10 kinds of people in this world... Those who understand binary and those who dont.
|
|
|
|
|
I have a Menu control (asp.net custom control) coded in c# which I use in different c# projects. Because this group started coding all new projects in c# and in my case there are old projects in vb.net.
I would like to use same Menu control in vb.net project too. I guess it should be possible but I don't know how to do. Thanks for any help.
Ashok Ojha
|
|
|
|
|
I have the need to output text to a file in which when its printed on a pre-printed form, the values in the outputted text file will match up with the boxes on the form. Like an automated typewriter of sorts. I'm doing this so far with the System.IO namespace. The issue i'm having is the space between carrage returns. I'm using a char[] and creating 5000 ' ' char in it and ever 80 chars i'm putting a '\n' char. Then using that to insert at a specific point in that char[] so when it prints its on the specified line and distance from L to R. But on a carrage return, there is a default gap, that gap is throwing off some of the lines. Does anyone know how to correct this, or have a better way of achieving this?
Think of it as a Doctor form that is preprinted blank... and I need to access data from a database and write it to a text file in such a way that when the text file is printed on this preprinted template... the outcome is matched up like you did it on a type writer. Make sense?
Thanks in Advance,
Scott
|
|
|
|
|
Hi everyone,
I am working with a gridview (actually a radgrid from telerik) control, and am having some trouble.
I would like to use a dropdown box instead of a simple textbox for some of the columns when in edit/insert mode. The thing is that I would like to make the substitution of controls in code, not using template field.
Basically, I was wondering if I could catch an event (and what event), and change the control before it was rendered, the somehow retrieve the combobox selection and update the column value with it.
The reason I need to do it this way is because the control is supposed to be generalized for any dataset (using stored procs), so I can't 'hardcode' the template.
When putting a row in edit mode, I will need to check each column to determine what control (textbox, dropdown, ...) to use. This info will be provided by the dataset.
Thanks in advanced, and please ask for clarification if you need it.
-----------------
Genaro
|
|
|
|
|
Hi Genaro,
Just wanted to check if somebody was able to help you or in case you cracked your problem yourself !
|
|
|
|
|
i need something like a vb6 tab control in asp.net, what control in asp.net can i use
t.aransiola
|
|
|
|
|
|
Hi,
I DataGrid if Paging is allowed then,if table that is binded to DataGrid has 300 rows,and each page dispalys 10 rows.In default paging,for the first page DataGrid get the 300 records and displays the firts 10 records.for the seocond page Datagrid gets 300 records and display 11 th 20 th records.This affects on Performance.So for the datagrid we implement Custom Paging.In the New version VS2005 there is GridView.For the GridView if paging is allowed
My Question is:GRIDVIEW ALSO FETCH THE RECORDS SIMILS TO DATAGRID.
And one more question is For the DATALIST AND REPEATER controls,There is no Built in paging facility so I USED ThePAGEDDATASOURCE class to implement paging for the above 2 controls.For DATAGRID Custom paging Can we use the PAGEDDATASOURCE,or we have to write stored procedure to fetch required number of records?
Thanks in advance.
|
|
|
|
|
hi,
i ve a code which will insert a pic using execCmd to a div and saves that content to the DB as Html code.
but when an image is inserted, it is not saved to the server and the local path is saved into the DB along with the HTML code. so when i run this web application in another machine, images will not show up...
is there a way to save the image to server and save the server path to the src of the img tag inside HTML code and save the HTML code to DB.
Thanks in advance...
|
|
|
|
|
Sir,
I have a datagrid and when i go to delete the row in the grid i want to make it confirm that Are u sure u want to delete that record having id=10
Id is that column in the datagrid.
Can I send this message even with the id number.I mean when i delete the record and the row contains id 10 then it should display the message .Are u sure u want to delete the row having id =10.
Sir I want to write the code in code behind file.
Please help.
|
|
|
|
|
Yes, you can. You simply add the id value when emitting the confirm client side script in the server side code. See the sample code from here[^].
|
|
|
|
|
Hi,
In a web app we are using ID Tech VersaKey POS Keyboard 3 track to read card information.
How to read data and show it in textboxes in an asp page.
A sample code or article will be more helpful.
Thanks in advance
|
|
|
|
|
Sir,
I want to learn NTFS file Extentions I mean how to make programs and before that what are NTFS File Extentions .
Can u please help.
Thanks
|
|
|
|
|
Seems your question does not have anything to do with ASP.NET.
|
|
|
|
|
I have made a collapsible composite custom control that has two panels acting as Header and Body of the control. I dont know how to make its designer so that users of the control are able to drag and drop controls in its Header or Body. I can add/remove controls in them programmatically but I dont know how to make it work at design time.
I dont want to use Templates in my custom control. I want to use all the properties of Panel control and thats why I am using Panels as Header and Body of the control. But I want to make it behave like two editable regions at design time too.
Thank You
Regards
Khalid
|
|
|
|
|
|
I know that I would have to make a custom designer for my control. The problem I am getting is that I have not used ITemplate in my custom control and I just dont want to use it for some reason. Instead, I have used Panel controls in my Custom Control. So, in this situation how can I make my custom designer so that there are two editable regions over it that actually make Header and Body of the control and correspond to respective Header and Body Panels of the control.
Regards
Khalid
|
|
|
|
|
Hi...
How can i sort a datalist items? i mean sort a column in datalist.
thanks.
behnam davoodi
|
|
|
|
|
when click on the column name(datalist header) rebind the datalist with the updated resultset(orderby that column name).
Best Regards,
Apurva Kaushal
|
|
|
|
|
So I have a project in SourceSafe but there are no solution files.
Now im going around in circles creating new project and virtual directories etc but i can't get it to work, can i create the project without the project/solution files?
I will respond if any additional information is needed, need help ASAP if possible
Thanks in advance,
Colum
Ps Using Visual Studio 2003 and asp.net
|
|
|
|
|
You should be able to create an empty solution and add the existing projects to it.
The project itself usually doesn't contain any more information than references to DLLs and other projects. If all else fails, you could just create new projects and add the source files to it.
---
b { font-weight: normal; }
|
|
|
|