|
I am in the processing of trying to run a C # asp.net 2010 web application from my workstation so I can understand it and add my own webpages to the application. However to get this application to run, I am trying to determine what the following values should be in the web.config file:
^<appSettings>
<add key="ReportViewerServerConnection" value="" />
<add key="ReportViewerUser" value="" />
<add key="ReportViewerPassword" value="" />
<add key="ReportViewerDomain" value="" />
<add key="ReportServerUrl" value="" />
<add key="ReportsPath" value="" />
</appSettings>^
Let me know if the following settings are correct and/or what would you recommend?
^
<add key="ReportViewerUser" value=general company name? />
<add key="ReportViewerPassword" value=general company value />
<add key="ReportViewerDomain" value=general company domain or report server doamian?/>
<add key="ReportServerUrl" value="http://localhost/reportserver" />
<add key="ReportsPath" value="" />^
where would this reports path be on my local workstation?
NOTE: I have C#.net 2008 desktop experience, but this is the first time I am working on anasp.net 2010 application.
|
|
|
|
|
i am developing sending bulk mail in asp.net using C#....how to send mail without internet connection...Is There any code in C# for sending bulk mail without internet connection...(intranet to internet)
|
|
|
|
|
How do you expect your mail messages to be delivered without internet connection? Without a communications link to the mail server, and from there to all the mail receivers, it is not possible.
|
|
|
|
|
I think the question is about sending mail from a machine that itself doesn't have an internet connection, but does have an intranet connection.
If so, all it needs is another machine on the intranet with an internet connection and run an SMTP server or relay on it.
|
|
|
|
|
Maybe you should have posted this information to OP.
|
|
|
|
|
I have an index page that I want to filter based on drop down list selection, this is the relevant code:
Controller:
public ViewResult Index()
{
var observations = db.Observations
.Include("Claim").Include("Defect").Include("InspectionType")
.Include("Location").Include("Property");
ViewBag.defectId = new SelectList(db.Defects, "id", "displayId");
return View(observations.ToList());
}
public ViewResult Search(int defectId)
{
var observations = db.Observations
.Include("Claim").Include("Defect").Include("InspectionType")
.Include("Location").Include("Property").Where(o => o.defectId == defectId);
return View(observations.ToList());
}
View:
@Html.DropDownList("defectId", String.Empty)
@Html.ActionLink("Search","Search", new { defectId=??????????????})
That big old question mark chain is where my issue lies. How do I get the value from the above dropdown list back to the Search ViewResult on the controller?
Cheers, --EA
|
|
|
|
|
I've been using Data CacheDependency for a while now for my XML File based data.
But then I suddenly had the need to use a data cache for my SQL Server based Products table and started looking around for some help.
Then I found this:
http://www.asp.net/data-access/tutorials/using-sql-cache-dependencies-vb
After taking a look at this tutorial, I said "Wow, there goes my sunday afternoon!".
But being lazy as I am, I started wondering if there wouldn't be an easier way for achieving what I wanted, and this is what I came up with.
1. I created a Table named TableChanged with 2 columns:
- TableName varchar(20)
- Changed bit
The idea is to track changes made to other tables; for the time being there is only 1 row in it:
TableName Changed
Products True
2. I created a trigger in the Products table:
CREATE TRIGGER Changed
ON dbo.Products
AFTER INSERT, UPDATE, DELETE
AS
Update TableChanged Set Changed = 1 WHERE TableName='Products'
So everytime something changes in Products, the value of Changed becomes True, in TableChanged.
I created the same trigger in table Categories, since it's related to Products.
3. In PageLoad I did:
If Not IsPostBack Then
Dim dv As DataView
Dim changed As Boolean = Global.CheckChanged("Products")
If changed Then
dv = LoadDV()
Else
dv = Cache("cachedDV")
If dv Is Nothing Then
LoadDV()
dv = Cache("cachedDV")
End If
End If
Protected Function LoadDV() As DataView
Dim dt As DataTable = Product.GetDiscounted
Dim dv As DataView = New DataView(dt)
Global.UpdateChanged("Products")
Cache("cachedDV") = dv
Return dv
End Function
Global and Product are classes in my BOL which handles the dataconnection thru my DAL. The sprocs used for CheckChanged and UpdateChanged are the following:
ALTER PROCEDURE dbo.TableChangedCheck
@sTable varchar(20)
AS
SET NOCOUNT ON
Select Changed From TableChanged WHERE TableName=@sTable
RETURN
ALTER PROCEDURE dbo.TableChangedUpdate
@sTable varchar(20)
AS
SET NOCOUNT ON
UPDATE TableChanged SET Changed = 0 WHERE TableName=@sTable
RETURN
So, on Pageload, if changed = true the dataview gets populated from the db and is added to the cache, while the row "Products" in TableChanged gets flagged as False.
On subsequent Pageloads, changed = false, so the dv gets populated from the cached dv;
And this goes on until either the Products or Category table get altered or the application restarts.
Very well then, this seems to work. My question is now why would the people at MS dream up
the SqlDependency Class if the same result can be achieved in this (apparently) much simpler manner?
What are the hidden pitfalls, drawbacks, disadvantages, if any, of my custom implementation.
I was hoping someone more experienced on the subject could reassure me to stay with it.
In this case it might help out others too, looking for the same thing.
Thank u for your attention
Jaime Premy
modified on Friday, September 16, 2011 8:43 AM
|
|
|
|
|
As per my understanding and knowledge, your solution is working for one table but if you need same thing in future for different table then you have to manage same thing same for other table. So Sql server provide itself feature called Cache Callback inbuilt feature and easy to maintainable and there less cost is associated. Please read more about notification:
http://rusanu.com/2006/06/17/the-mysterious-notification/[^]
Parwej Ahamad
|
|
|
|
|
I am creating a small web based resporting tool with ASPX with C# code behind (.NET Framework 3.5), LINQ to SQL.
Need to provide users the ability to customize the reports by altering selection in the drop down list - I have been able to do so successfully.
Thing I need help with is: When I select a few things: the display still reflects (All); I need to show which option has been selected, if more than one drop down items is selected, it should show 2,3,n selected.
|
|
|
|
|
You need to describe that which control you are using for multi select dropdown and what you done for this.
Maulik Dusara
Sr. Sofware Engineer
I love it when a plan comes together
|
|
|
|
|
In a new C#.net 2010 asp.net application, I want to link three web pages together by uisng buttons and/or items users click on. I want the buttons to be like 'next', 'previous',update. How would I accomplish this task with C#.net 2010 using asp.net?
|
|
|
|
|
|
Hi
We are migrating a project from visual studio RPG code to C#.They have used IBM Mainfram database AS400.
In codebehind some times they asssed some table in DB2 and call the CALL PROGRAM,which access the physical file in AS 400.
Task:
Now we are doing a POC on connecting db2 and have stored procedure.In stored procedure how to access the physical file in AS 400?
guhananth.S
|
|
|
|
|
I have a question about a C#.net 2010 asp.net application. I obtained some code from a contractor that uses web pages. The exisitng code has a main page where the user selects where
what web item they want to work with. I would like to add 'web forms' and tie into the overall company 'web pages'.
Can 'web forms 2010' tie to 'web pages 2010' from the 'main selection page' the user sees? If so, can you point me to a url and/or explain how this is possbile? If this is not possible,
can you can me why?
|
|
|
|
|
I have a question about a C#.net solution file. I am trying to open a C#.net solution file with visual studio.net 2008 that my company obtained from a contractor. I can not open this file. I click on the file and it looks like it will open but it does not.
I am thinking problem could be one of the following:
1. This could be a 2010 C#.net solution file. If that is the case, is there some way to convert the visual studio ide to 2008? If not, I will just need a copy of visual studio.net 2010,correct?
2. My 2008 visual studio is setup for C#.desktop application. This solution file is asp.net. Thus would I need to install the asp.net options in my visual studio.net ide to be able to see
these files? If so, how do I add the C#.asp.net to to visual studio ide?
|
|
|
|
|
Dear All,
I have created a modalpopup using modalpopupextender within a ascx; it shows well in IE7, but not in IE8 or IE9.
Suppose if you refresh the browser it shows the modalpopup.
How to fix this issue.
Please reply as early as possible.
Thanks,
Vasanth
|
|
|
|
|
|
I have a strange problem. I have ascx control and I have only ListView in it. When I use generic method to fill this ListView with data I get Exceptiion - ListView is null. But when I use method without generics(with known parameter) everything is working fine(ListView is not null). Could you explain me why something like this is happening?
this works fine:
public void SetListViewDataSource(List<BaseBO> data)
{
this.ListView.DataSource = data;
this.ListView.DataBind();
}
and this is not working:
public void SetListViewDataSource<T>(List<T> data) where T : BaseBO, new()
{
this.ListView.DataSource = data;
this.ListView.DataBind();
}
I am using Model-View-Presenter pattern
modified on Wednesday, September 14, 2011 3:40 PM
|
|
|
|
|
|
I'm using ASP.NET 4.0 working in VS2010 right now only debugging not moved to a real server. I have some code to set the working directory node by node. This handles paths longer than the limit.
string[] dirs = targetDirectory.Split(Path.DirectorySeparatorChar);
foreach (string dir in dirs)
{
string adir = "." + Path.DirectorySeparatorChar + dir;
if (!Directory.Exists(adir))
{
Directory.CreateDirectory(adir);
}
Environment.CurrentDirectory = adir;
}
I'm seeing that when handling multiple requests the one request will write the cwd and the other request wil try to write too and they end up conflicting. I'm not really surprised.
This does totally foil my plans for world domination. Can anyone suggest something? Locking an object until I begin file operations? Is there a setting in IIS to make separate processes? I really could use some help with this one.
|
|
|
|
|
Hi
My page is inside the a iframe. when i click button on my page the data in my page save to database and gives javascript alert message when saving is complete. I am using RegisterStartupScript method to show a java script alert. My problem is on ie javascript alert shows behind the browser. User need minimize ie to see the alert. please help me
Dushan Perera
|
|
|
|
|
Maybe because of you used iframe,that's why your pop up alert at behind of the browser. At code behind after finish insert the data, create session and in successfully page,try to check session in page load and popup alert if session exist.Example:
insertpage.aspx.vb
Session("success")="anything"
successfulinsert.aspx.vb
If Session("success") <> "" Then
Response.Write("<script language=""javascript"">alert(""Successfully Insert the data"")</script>")
Session.Remove("success")
End If
Maybe my code got error because I simply write it without debug or test it 1st but that's the idea.
|
|
|
|
|
Dear all,
I use the code below for firing a method, however .. it's not firing. I use the same piece of code (different class though) a little further in my application and it's working fine.
protected void Page_Load(object sender, EventArgs e)
{
Control ce = LoadControl("TimeEntry.ascx");
pnlProjects.Controls.Add(ce);
foreach(Control ctl in pnlProjects.Controls)
if (ctl.GetType() == typeof(TimeEntry))
{
TimeEntry te = (TimeEntry)ctl;
te.LoadControls();
}
}
I don't want to put
LoadControls();
in my Page_Load of TimeEntry.ascx because it's posting back when I navigate away from the page and thus firing the method again.
Can any tell me what I am doing wrong.
Kind regards,
|
|
|
|
|
You can put the LoadControls in Page_Load but with below condition :
If(!IsPostback)
LoadControls()
This will cause the LoadControls to call only at the first loading of the page and not everytime postback occurs.
IsPostBack property is used to check whether the page is getting loaded first time of the postback caused by any control on the page.
Hope this helps.
All the best.
I quit being afraid when my first venture failed and the sky didn't fall down.
|
|
|
|
|
I am asking the question in this group. I orginally entered it into the wrong group C#.net.
I am wondering if you can tell me what would be the good items I can drag and drop from the visual studio asp.net 2010 tool kit that would acomplish the following tasks:
1. most of the data would be contained in a datagrid,
2. I would like to have a tab on the top of the webpage where the user can tab to over click the 'next' button to accomplish the following tasks:
*The first tab will:
a. allow the user to have a 'type' ahead feature so they can select what organization they want to work with,
b. there will be a datagrid where the user can check off what suborganizations that are affect,
c. There will be a datepicker so the user can select certain dates, and d. there would be a 'next' button and/or tab on top for the user to go to the next page,
e. On this page, there will be a 'save draft' button. This will not commit the data to the database, but it will save the work entered so far.
f. On this page there will be a restart button. Basically this clear out any data and allow the user to start from the beginning again
*The second tab will:
a. display the data entered on the previous page on the top.
b. there will be alot of rows where the data will be prepopulated, and/or allow the user to enter data.
c. This page will show any errors that the user made.
d. This page will also contain a description of what what kind of data is entered on that row,
e. This page will have a button or tab to update the database.
f. There will be a 'save draft' button. This will not commit the data to the database, but it will save the work entered so far.
g. On this page there will be a restart button. Basically this clear out any data and allow the user to start from the beginning again.
h. The final tab will show summary information of what was just entered.
|
|
|
|