|
I have a C# asp.net 2010 webform page that I am developing and I have the following two questios:
The following is the line of code I am referring to;
[^]<%@ Page Title="" Language="C#" MasterPageFile="~/Rpt.Master" AutoEventWireup="true" CodeBehind="Atts.aspx.cs" Inherits="Rpt.WebForm3" %>[^]
When I first setup the new webform page, I used the default name of WebForm3 for awhile. After starting to work with the markup file, I renamed the WebForm3 files to Atts in solution explorer. Now the line of code that says
Inherits="Rpt.WebForm3"
will not allow the web page to work if I change the "Rpt.WebForm3" to ="Rpt.Atts".
I do not see a WebForm3 file in the solution file.
1. What could I be doing wrong? Could something be 'wired together' wrong?
2. When the application does not run, I do not know where to check for the real error message that happens? Is there a file a brakpoint spot I should set to see where the problem comes from. What I see is the generic error message in the web config file that displays the final default error message if nothing is runnning.
|
|
|
|
|
Hi
So Rpt is your solution name right.When u rename ur file to Atts.aspx the codebhind=CodeBehind="Atts.aspx.cs"
.
You had wrongly declared in Inherits="Rpt.WebForm3"
it must be Inherits="Rpt.Atts".
While renaming the file the Visual studio on changes the Codebehind and not the Inherits part.
So we need to check.
Thanks
S.Guhnananth
|
|
|
|
|
Hi,
I need to call 3 tables in business layer by using List Collection.
1)I NEED QUERY Clntmast table with clientname.Column
Returned are clientid,cl_Colno# etc.
2)Then i need to query Colector table with cl_Colno#.
how to proceed
ASPX.CS
<pre lang="c#">
Session["CLNTNO"] = ddl_SpecialUser.SelectedItem.Text.Trim();
SupplyChainProcessor processor = new SupplyChainProcessor();
List<SpecialUser> clientName = processor.ShowDetails(Convert.ToString(ddl_SpecialUser.SelectedItem.Text.Trim()));
foreach (SpecialUser dataclientName in clientName)
{
}
BAL:
<pre lang="c#">
public System.Collections.Generic.List<SpecialUser> ShowDetails(string strClientName)
{
SearchClientDataAccess user = new SearchClientDataAccess();
System.Collections.Generic.List<SpecialUser> lstSpecialUser = new System.Collections.Generic.List<SpecialUser>();
lstSpecialUser = user.ShowClientDetails(strClientName);
foreach (SpecialUser specialUser in lstSpecialUser)
{
specialUser.cl_Cred = 0;
}
return lstSpecialUser;
}
|
|
|
|
|
I am asking this question since I am sharing a C# asp.net 2010 solution file with a contract shop. The contract shop in another town has the main control of the solution file. Basically I am working with an older version of the solution file and adding my own web pages to it. When I have completed developing my web pages, I can going to add my code to the general solution file.
Since I am new to working with C# aspx source view and designer files, I am concerned about losing the formatting I setup in my code when adding my new aspx and aspx.cx files to the general solution. Basically right now I am attemtping to line up the tags in the aspx file so I can tell what labels match each other.
Thus will I have a formating problem to be concerned with? If so, is there a way I can prevent from losing the formatting?
|
|
|
|
|
|
This is aeparate thread.
What I am referring to is the following:
When I say I do not want to lose the formatting, I want to show the following example:
The aspx code well formatted code would look like:
^<asp:Content ID="Content5" ContentPlaceHolderID="ReportBody" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>^
and when I code the code to a new location, I do not want all the tags to merge togetther and look like the following:
^<asp:Content ID="Content5" ContentPlaceHolderID="ReportBody" runat="server"> </asp:Content><asp:Content ID="Content6" ContentPlaceHolderID="Footer" runat="server"></asp:Content>^
I do not want all the tags to merge together. I want the tags on separate lines so it is easier to read and maintain.
Thus when I add my code to the same general solution, I do not want to lose the formatting above.
When I add my code, I am basically saying I will need setup a 'add' new item to the 'general' solution. I will then copy 'working' copy of my code and paste the code into the new web form aspx file I just created.
|
|
|
|
|
I am building an mvc 3 web application. The home page will have a search text box, linkA and linkB. When the user enters text into the search textbox it will search and display results.
I am confused on whether the Search action will be in homecontroller and if I want to display the results on another page then what should I do within this action method.
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
modified 13-Oct-11 17:45pm.
|
|
|
|
|
I think you have to pass a parameter with (search textbox) value to the next page.
sunaSaRa Imdadhusen
+91 99095 44184
|
|
|
|
|
I am currently working on adding a new page to an existing C# asp.net web forms 2010 application.
On the web page that I am setting up, I was told by my company to place all controls in asp.net Since I am new to working with C# webforms (but have desktop expereince), I have following question:
On one of the row I need to place a listbox that will be tied to a textbox on the previous line in the same table. The textbox on the previous line of the table is going to have a 'type ahead' feature.
Thus would you place the listbox within the same table as all controls on the page or would you you place the listbox in it's own table?
also, can you point me to a reference so I would how to connect (wire together) the textbox with the lsitbox control?
|
|
|
|
|
I am currently working on adding a new page to an existing C# asp.net web forms 2010 application. Since I am new to working with C# webforms (but have desktop expereince), I have following question:
When I drop and drag a control from the toolbox onto sourceview,
I lose the formatting I setup in sourceview.
Thus can you tell me if there is any way to keep the formatting in sourceview so it does not change?
|
|
|
|
|
I answered this in your previous post below.
Hope you are sorted otherwise just give a shout!
Morgs
|
|
|
|
|
I am currently working on adding a new page to an existing C# asp.net web forms 2010 application. Since I am new to working with C# webforms (but have the desktop expereince), I have the following questions/items to mention:
1. The new web page will use the master pages already setup and I am suppose to put all web objetswithin a webfrom table. **This is a requirement of the project.
2. When I am working with the webform table, I am using the designer to create more rows in the table when I need it. However on one row I want a label and a text box embedded in one row of the table. I can not figure out how to drag the label and textbox into the correct cells on the table. The only thing I figured out was to go into the source code side and copy the asp.net label and textboxes into the correct cells.
Thus can you tell me how to drag and drop items from the toolbox into the correct tables within the table?
3. Can you tell me how to drag a gridview control into the correct cell of the table?
4. If you were me, would you create separate tables for each line I am trying to setup in one orginal table?
5. In the source code, I would like the code to line up so I can match the label tags. When I am in source view, I do have the code line up. However, when I drop and drag an item from the toolbox onto the designer, my formatting gets messed up. Is there a way to keep this formatting?
|
|
|
|
|
3) Why use design view? VS Designer has been notorious for mucking with layouts. You can still drag and drop in source view.
4) If it were me I wouldn't use tables at all. The are better performing, more modern methods.
5) see 3
The drag and drop thing is nice but there are times when it is best to just go to the source, and working without the tools is something you should learn.
No comment
|
|
|
|
|
Hi,
It looks to me that you admit when you drag and drop controls from design view onto your page out of HUMAN ERROR you are dropping the controls onto a wrong place/point/spot! YEs i hear you there, you can make such a mistake which as you mentioned is messing with your entire layout. Again you mentioned that if you do the same process in source view you are dropping the controls at the right spot, that's it! you are going to start using source view to design your web pages/forms because that's what is easier for you, and for most of us i guess...
Besides there's a 50% chance that the page design you see in design view won't be the page design you will see when opened in a webbrowser(i.e IE or firefox). In my projects i use source view to create my design and a browser to see my work done so far, i don't remember using design view.
..And like Mark mentioned, try and avoid tables to design your pages. This is old and designers have decided to leave tables alone only if you really need it then you can use tables otherwise try the magic and power of DIV (page division), this element shipped with CSS[^] can start and finish a page design
Happy coding,
Morgs
|
|
|
|
|
Thanks my late problem solve
I have a grid view with 3 drop down list in himself any drop down list link to late drop down list
barehanded data drop down list any learn future drop down list of which table select data
update and insert in grid view
I need to a SAMPLE of grid view with up specs
Thank
|
|
|
|
|
hi
i am developing an asp.net application in visual web developer 2010
i need to use the IIS configured in the system,but i dont know how to use it.
I am developing the application and pressing F5 or the run button to debug and execute the application and the applicaton opens in a local host port number(say http://localhost/XXXX/default.aspx)
so i think it is using the internal visualwebdeveloper IIS i need to use the IIS of the system...how to do it
K.Gayathri
|
|
|
|
|
|
I am using MVC3, but that is not really an issue I don't think. I want a user to click on a link that will create and generate a PDF in the background that will be available for download. So the experience should work like this:
1. User clicks button to generate report.
2. User continues to work and navigate pages while report is being generated in background and saved.
3. When report is done, email is sent to user indicating that report is done.
4. User can visit job queue at any time to see progress.
I can write this code, the issue is that I am not sure how to handle the asynchronous report generation issue. For one, I am not sure how to build the @Html.ActionLink to simply fire off the action without reloading the page (e.g. Asynchronously). For two, I am not sure how this all works in regards to keeping the process running when the user navigates away from the page.
Help.
Cheers, --EA
|
|
|
|
|
If you have control over the webserver, then maybe you can do this ...
1) create a windows service that uses FileSystemWatcher to watch an incoming directory. (maybe xml docs)
2) When your web user wants to run a report, your code behind writes a "job file" (xml?) to the watched directory. The file will contain all of the parameters necessary to run the job and the email address of the person to notify when it is complete.
3) Your windows service picks up the job, maybe writes progress data to a db table and runs the report. when the report is complete it sends the email to the requesting user.
You can make this windows service multi-threaded to run multiple reports at a time if necessary.
That's my basic idea.
Good luck.
david
|
|
|
|
|
I don't have control, it is a hosted web server. I am thinking about using an AsyncController to generate and save the report and email the user when complete. Thank you for the suggestions.
Cheers, --EA
|
|
|
|
|
Hey all,
Im still fairly jr to the whole development thing and I'm having an issue with double hop impersonation.
Unfortunately, kerberos is not running on our network and from what I have read this is what is stopping me from doing what I need to do.
What my code is doing is calling a WCF proxy service and getting member data and then using that to get items from SharePoint using the Lists.GetListItems() SharePoint web service.
I am able to get my member data from WCF proxy but when I call the GetListItems() I get the 401 because impersonation is not working.
- Impersonation is "true" in web.config
- Authentication mode is set to "Windows" in web.config
- I have set the WindowsIdentity
I CANNOT manually enter the credentials and HAVE to use impersonation.
Possible?
XmlDocument xmlDoc = new System.Xml.XmlDocument();
XmlNode query = xmlDoc.CreateNode(XmlNodeType.Element, "Query", "");
XmlNode viewFields = xmlDoc.CreateNode(XmlNodeType.Element, "ViewFields", "");
XmlNode queryOptions = xmlDoc.CreateNode(XmlNodeType.Element, "QueryOptions", "");
string listName = "{89ddecff-9716-4b4f-ac64-3e7f3491fc05}";
string viewName = "{69326313-a982-41d3-be58-7ce7c06b5693}";
string rowLimit = "150";
queryOptions.InnerXml = "<includemandatorycolumns>FALSE<dateinutc>TRUE";
viewFields.InnerXml = EcmQuery.GetViewFields();
query.InnerXml = EcmQuery.GetQuery(rowno);
System.Security.Principal.WindowsIdentity wId = (System.Security.Principal.WindowsIdentity)HttpContext.Current.User.Identity;
System.Security.Principal.WindowsImpersonationContext ctx = null;
ctx = wId.Impersonate();
ListsWebReference.Lists list = new ListsWebReference.Lists();
list.Credentials = System.Net.CredentialCache.DefaultCredentials;
XmlNode items = list.GetListItems(listName, viewName, query, viewFields, rowLimit, queryOptions, null);
Thanks in advance for ANY help!!!!!
|
|
|
|
|
I am adding some new pages to an existing C# asp.net 2010 web forms website. Due that that fact and I am new to web design but how desktop expereince, I have the following question:
On the exsiting web pages, most of the controls are embedded in a web table control. I am guesing this is occuring so all the web form controls are aligned correctly. Is that the only way to make the various controls line on correctly? If not, can you tell me another way how to make the controls all line up the same. (I do know when I worked with pure HMTL in year 2000, all the HTML controls were embedded within the same table
|
|
|
|
|
In the past using tables for alignment was the only method available. Now, however, CSS is being used for tableless design.
This is one place to start but there are many more resources available
Tableless layout HOWTO[^]
No comment
|
|
|
|
|
for alignment take a look at http://960.gs/ or even better if you are interested in using jQuery and want an adaptive display you can read about the following about an awesome jQuery plugin that this really great developer I know posted.
A jQuery plugin for an Adaptive 960 Grid System
who better the shamelessly promote other than yourself?
|
|
|
|
|
Hi,
Nowadays to get a best web page layout that is not only easy to render on client side but also easier to design, is to actually avoid tables and use something like divs (or ). This element can align your entire page like magic! As you can see in my example i have put in place a simple but yet handy attribute to the div, "style". The style attribute will help you style your div (oh div stands for "division", a division on your page), and for the sake of alignment in my example i have put float:left, you could also have float:right or simply don't put the float and the browser will decide where to place your division(s) when rendered. There are many styles you can put such as margin, padding, text-align, background, color....and much more!
This comes with the power and magic of CSS! Get a hard start on this topic, css:
http://www.csstutorial.net/[^]
This all you need to giveup tables on your pages.
Happy coding,
Morgs
|
|
|
|