|
The reason you are not getting any answers is that you are not asking your question in a way that makes it easy to understand. You are also not even asking any real question at all. You are simply stating a bunch of facts... And then saying "It's slow, help me".
You will get much better results if you rewrite your question with very specific questions, and provide only the code necessary to recreate the problem. Ask questions that can be answered explicitly, not open ended questions.
We don't know what to do with "It's slow, please help me".
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
It is very hard to understand what your actual question is. I'd suggest simplifying this down to just the relevant parts and ask a specific question.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
I have a asp.net web page developed using C#.Net. there are several GridView controls. I want to avoid displaying the date "01/01/1900" which is a default date in database tables in those GridView columns.
In DataRowBound event i can replace "01/01/1900" with "" (blank). When there are lot, is there an easy way to replce "01/01/1900" with "" at run time
|
|
|
|
|
|
Hi folks ,
we are trying to publish our website to production server.which includes changes to global.asax file's application_start.which registers a bundle to load/compress js/css files.it works fine with local solution.
But when we deploy same application to server.all bundled resources are not loading after login to the page.i suspect the problem with global.asax as this file makes a call to the bundle class to register bundled resources.
When i look at the global.asax file.Global.asax file is present in root directory of publised folder.and global.dll files are present in bin folder also.
but after deploying to the server global.asax file is not updationg in deployment server.
due this issue i am not able deploy it to the server.
Any suggestions please..
-- modified 5-Feb-15 4:28am.
|
|
|
|
|
Your global.asax file won't update because it hasn't changed. This file only has a small amount of metatdata in it to point to the DLL. If you right click on the global.asax in your solution explorer, choose "view markup" and you will see only a single line of code that looks like this:
<%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication.Application" Language="C#" %>
Since this file doesn't change, it won't be updated when you deploy. As such, this isn't the cause of your problems.
More than likely, the cause is something else, but since you haven't included more details about your problem we can't really help more.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
I have created a global.asax file not gloabal.asax.cs file.it works well with IIS 7 but not on IIS 6 Version.
|
|
|
|
|
Please help me.. I am trying to store variable in a class however during grid insert all variable gone. Below is my code
Dim StateTemplate As New StateTemplate
Private Sub btnLoad_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLoad.Click
Try
Dim StateTemplate As New StateTemplate
With StateTemplate
.YearCode = ddlPlanYears.SelectedValue
.State = ddlState.SelectedItem.ToString
End With
...
Private Sub rgExclusions_InsertCommand...
StateTemplate is empty here
|
|
|
|
|
byka wrote: StateTemplate is empty here Of course it is, because you used a different StateTemplate object within your subroutine. Delete the declaration between the Try and With statements.
|
|
|
|
|
I delete it. and it still not working
Private Sub btnLoad_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLoad.Click
With StateTemplate
.YearCode = ddlPlanYears.SelectedValue
.State = ddlState.SelectedItem.ToString
End With
|
|
|
|
|
Where have you declared your StateTemplate object? What happens to it after you return from the btnLoad_Click event? Please expand on the expression "it still not working"; we cannot guess what that means.
|
|
|
|
|
I declare after
Inherits System.Web.UI.Page
I don't do anything with it after btnClick event
|
|
|
|
|
byka wrote: I don't do anything with it after btnClick event So what is your problem?
|
|
|
|
|
the variable is empty during grid insert
|
|
|
|
|
I'm sorry, but there is really no point in posting these vague statements and expecting us to guess what your application is doing. Show where the variable is set up , and where you try to use it, and explain the exact sequence of events that should make this happen. If you need to collect further information then use your debugger during a test run of your code.
|
|
|
|
|
I'm guessing that there is a post-back between the btnLoad_Click event handler and the rgExclusions_InsertCommand event handler?
When an ASP.NET page posts back, the request is served by a new instance of the page class. Once the page has been rendered, that instance of the class is discarded, along with the value of any fields. That is why your StateTemplate field is not persisting between requests.
If you want to save the values between requests, then you'll need to store them in ViewState:
Beginner's Guide To View State [^]
Understanding ASP.NET View State[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Time to learn something new this year.
So ASP.net MVC 4 Razor is the way to go?
I want to create responsive web designs from this point forward, done with the old stuff now.
Sure looks intimidating, I created the starter project, pretty neat how it creates the database for you.
Just wanted to get some feedback before I dive into this.
|
|
|
|
|
I would like to do as much as possible to tweak my existing web sites to a responsive design.
I guess this can be done via CSS, and a lot of brain work.
Or would it be better to just create a mobile version for small phones?
What are you guys doing with your classic web sites? and the small phone issue like the iPhone 4 or 5.
|
|
|
|
|
It's often not possible to "tweak" a non-responsive site into one that is, it normally requires a full UI and css redesign from the ground up. You should be able to keep your functionality and code, just change the markup.
If you do get a good responsive design then you can use the same site for mobile and desktop.
|
|
|
|
|
I started experimenting with the master pages of one of my web apps. Thought I did a great job with the CSS, until I got to testing on an IPad and Safari. So I sort of wasted a day of work, or saved a week.
I'm starting to think that perhaps just a mobile version using m.domainname.com would be a better solution, and just do device detection.
Perhaps this is a good reason to learn MVC, which is so foreign looking to me.
Your right on the money, it needs to be built from the ground up.
|
|
|
|
|
Asp.Net MVC is very neat. Initially it is hard to get around if you're from Asp.Net WebForms, but once you get a hang, you will never look back. In fact, you will hate WebForms.
For responsive design, you can use Twitter BootStrap[^] It is basically the ground framework for a good looking site, with built-in responsive design support. It will save you a lot of time and effort. There are many CSS frameworks on the web that support responsive design, a simple Google search should reveal them.
All in all, Asp.Net MVC is a great framework to invest in, and it is here to stay.
---
H.B.
|
|
|
|
|
I was just watching the training video on Code Project
Learn MVC (Model View Controller) step by step in 7 days – Day 1[^]
It makes sense to me now. MVC would be easier for me after the learning curve, and I can see how it would reduce my development time, and make projects more profitable, plus produce that responsive design I was looking for.
I looked at the Twitter Bootstrap website, will download a copy and see if that's a good start point for me, and figure how to merge that in.
Thanks for the positive feedback on my choice to move forward this year, and the pointers!
I'm going to have a thousand questions here. like how to place an image element in the view.
|
|
|
|
|
Sure thing! If you have any question, feel free to ask, me and many other members are willing to help. Google also has an abundance of questions and answers.
Just to give you a little perception on the view:
Your controller will pass in a "model" to the View. The model can be your domain object, or a view model. I don't want to go into too many details and make it more confusing. You will learn these things as you get more into Asp.Net Mvc.
The view is a template with all the html and razor code. A sample template will be like this:
<!--
<h1>@Model.Name</h1>
<img src="@Model.ImageUrl" />
The razor templating engine then parses the HTML, fills in the model properties from the controller, and renders the raw HTML in the browser. Asp.MVC does all that automatically on the backend.
This produces clean and concise HTML, and lets you make it as semantic as you like.
It is all very beautiful.
H.B.
|
|
|
|
|
Cool, I was going to ask if I should use razor.
Installing that VS2013 Community Edition right now, and will start again today.
I've always had regrets about adopting asp.net webforms versions, so much of it was just stupid.
Was considering that Ruby on Rails or just going back to PHP and Linux, but I see a lot of PHP sites that I frequent using MVC now. I think Best Buy is now MVC as well.
|
|
|
|