|
As you are new here let me explain a few things. You don't need to say "In response to your...". Notice the button with the text "Quote Selected Text". Highlight something in the response and click this button; you will get this...
rachel_m wrote: In response to your
Another example
rachel_m wrote: The first webpage (that I did not mention in the first post)
To get the best answer and not need multiple responses to clarify points you should include all pertinent details. And do so as succinctly as possible, long posts will be ignored by most as they don't have time to read everything.
rachel_m wrote: In the database, there is a column for date1 and in the database there is also a yes-no column for date1
Why do you need to persist the yes/no? How is that relevant? What happens when a user changes the value? Yes the date is valid but No it was updated from the original? Will you store the original date? Where will you store it? How many modifications will you store?
IMO having a dropdown for a yes/no to edit a field is very cumbersome and not user friendly. Having a button that says Edit would be more appropriate. If you have five textboxes on the form and only two people that use the form, then train them to not change the date unless they want to. Some problem are best solved with humans not more technology. A textbox with a calendar like this[^] would be fine. The date won't be changed unless the user clicks in the box to display the calendar. The interface could even be displayed as a modal window rather than moving to a new page then back again. A much more pleasing user experience and a more modern design. You worry about old school controls but still use old school techniques.
rachel_m wrote: I was thinking of using all server controls since these two webpages are used by only one or two users for 3 to 5 days monthly.
The number of users and days they are expected to use the application doesn't determine the design or the controls that should be used. The functionality and requirements determines that. You do have documented requirements and designs right?
rachel_m wrote: what kind of javascript commands
There are no JavaScript commands. There are JavaScript functions that you write or you make use of JavaScript frameworks, such as JQuery[^]. You should learn which technology is best for which purpose. Making use of all server controls, although valid, is not necessary in all cases. To show or hide an element it is not necessary to make a round trip to the server to set
myControl.visibility=false; this can be done much better and faster on the client with
$("#myElement").hide()
rachel_m wrote: If the user says any of the dates are invalid from the dropdown list controls, I plan on updating the database
Well, yes, of course. But how? Labels will not be included in the post data for the form, only input controls such as textboxes. Have you considered asynchronous methods, such as AJAX? Displaying the interface as a modal dialog and using AJAX to post any updated values would be a more pleasing user experience, IMO, and more performant since you are only posting what is absolutely necessary, not using a sledge hammer ASP.NET postback method.
rachel_m wrote: this is my first set of web pages
Ever? Is there anyone in your company mentoring you or assisting with this?
No comment
|
|
|
|
|
Hey .. has anyone had a problem with updating the width of asp:Panel control in a web form, under Windows 7. This same web form code worked fine in Windows XP. But in Windows 7, the width never shows up visually as being widened.
Thanks .. Rick
|
|
|
|
|
guys;
I am using a hidden input to store the selected value of a custom control that represent a drop-down. the control works well after the Page is loaded on the server, but in a certain case i would need to get the selected value(the value of the hidden input) during Page.Init which returns String.Empty .
I used both Input.Value and Request.Form(input_name) with no use.
thank you;
Help people,so poeple can help you.
|
|
|
|
|
I am guessing this is most likely because the page is still rendering at this point.
since you are putting this information into a control I am assuming it is not attached to any kind of data with security issues so will a session variable not work?
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
But Sir;
I used a System.Web.UI.WebControls.DropDownList for the same case and it worked.
Help people,so poeple can help you.
|
|
|
|
|
I didn't read the other posts, but that's never going to happen.
Page.Init occurs earlier in the page life cycle than Page.load.
You create controls that can postback in page.Init
And you populate your controls with data in page.load
So your trying to get a value from an server object before data is even assigned to it.
There is no reason to get data in page.init.
|
|
|
|
|
jkirkerx wrote: that's never going to happen.
will, it happend in KaSha(the company in which i work).
anyway i made a work around to solve this case.
thank you;
Help people,so poeple can help you.
|
|
|
|
|
how to remove List (of ) remove, compare?
I have List (of user) . User my class with.
Dim users as new list (of User)
Dim user as user
user.name="test"
users.???(user)delete
|
|
|
|
|
|
I am wondering if you can tell me how to link (wire together) an update button to a detailsview control in a C# asp.net 2010 web page?
I have dragged a detailsview control on to this new web page and I have connected the detailsview control to a linq data source control. I have changed several boundfields to template fields and indicated which template fields are editable by setting the readonly property to false. I have also dragged a button control on to the webpage and I have clicked on the button control so the delegate handler is setup.
However I can not seem to connect the update button to the detailsview control. Thus can you tell me what else I need to do?
|
|
|
|
|
some sample code as to where you are having the problem would be very helpful.
did you define a handler for the button click event?
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
Hi freinds i have database and I tablles for Users and there Roles is there any Design pattern for authentication for custom database.
WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP
|
|
|
|
|
This is a very good post and talks about custom provider. This should be helpful
Click here
|
|
|
|
|
Thnx Brij
Thats what i was looking for.
WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP
|
|
|
|
|
SIMPLY INTRODUCED WHAT IS SILVERLIGHT?
shubham vijay
|
|
|
|
|
At least you should have asked this question in Silverlight[^] forum.
Before that you should have Googled[^] about that.
Start with MSDN[^]
BTW don't use ALL CAPS(means shouting) in internet.
|
|
|
|
|
On my intranet portal,Videos are playing on my system successfully.(Visual studio intalled on my system).But it is not playing on other systems when i host my portal on IIS.But after hosting on my system videos are played.
<embed id='embed1' runat="server" name='mediaPlayer' type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='500' height='405' designtimesp='5311' loop='false'>
</embed>
protected void DataList1_ItemCommand1(object source, DataListCommandEventArgs e)
{
try
{
if (e.CommandName == "select")
{
embed1.Attributes.Add("src", @"http://~/Uploads4/");
embed1.Attributes.Add("filename", Server.MapPath(e.CommandArgument.ToString()));
this.modal1.Show();
}
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
What problem can be?
modified 14-Nov-11 5:47am.
|
|
|
|
|
You have to convert the server file location to a qualified url
I wanted to give you an example, but I couldn't find it.
So you build a string, it can be virtual
/Movies/moviename.mpg
or hard code it
http://servername.domainname/movies/moviename.mpg
by the way, movie object have 2 sets of parameters, <embed /> is for firefox, and <object> is for ie.
check your object code for the latest version and update it.
|
|
|
|
|
|
Hi, everyone. I'm newbie in ASP.NET MVC framework. I've read "Pro asp.net MVC framework" and done a tutorial in this book. But i have problems with route table.
When i run application, the url: http://local:3425 listed some information in the page 1. But when i typed url: "http://local:3425/Page2", it got the error " Server Error in '/' Application.The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Page2"
Thanks in advance for any help.
Here it's the file Global.asax.cs
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
null, // Don't bother giving this route entry a name
"", // Matches the root URL, i.e. ~/
new { controller = "Products", action = "List", page = 1 } // Defaults
);
routes.MapRoute(
null, // Don't bother giving this route entry a name
"{controller}/{page}", // URL pattern, e.g. ~/Page683
new { controller = "Products", action = "Act" }, // Defaults
new { page = @"\d+" } // Constraints: page must be numerical
);
//routes.MapRoute(null, "{controller}/{action}");
}
protected void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
ControllerBuilder.Current.SetControllerFactory(new WindsorControllerFactory());
}
}
And file Controller:
public class ProductsController : Controller
{
private IProductsRepository productsRepository;
public int PageSize = 2;
public ProductsController(IProductsRepository productsRepository)
{
this.productsRepository = productsRepository;
}
public ViewResult List(int page)
{
int numProducts = productsRepository.Products.Count();
ViewData["TotalPages"] = (int)Math.Ceiling((double)numProducts / PageSize);
ViewData["CurrentPage"] = page;
return View(productsRepository.Products
.Skip((page - 1) * PageSize)
.Take(PageSize)
.ToList());
}
|
|
|
|
|
First format your code snippets like everyone here does.
The resource can't be found because it does match any route you have defined. In each route the first element is expected to be the controller and you have no controller for Page
Although this is from a previous version of MVC the routing mechanism hasn't changed that much, maybe it will help you
ASP.NET MVC: Part 2[^]
No comment
|
|
|
|
|
Good Day all
i have the following
<%# clsFlow.CleanBondNumber(Eval("ATB_NUMBER"))%>
and the Function CleanBondNumber is defined like this
Public Shared Function CleanBondNumber(ByVal val As Object) As String
Dim Final_bond_acc_no As String = String.Empty
If (val.ToString().Contains("Offer")) Then
Dim Finalstring As String
Finalstring = val.ToString.Substring(6)
If (Finalstring.Contains(" ")) Then
Dim SpacePost As Integer
SpacePost = Finalstring.IndexOf(" ")
Final_bond_acc_no = Finalstring.Substring(0, SpacePost - 1)
Return Final_bond_acc_no
Else
Return val.ToString()
End If
Else
If (val.Contains(" ")) Then
Dim SpacePost As Integer
SpacePost = val.IndexOf(" ")
Final_bond_acc_no = val.Substring(0, SpacePost - 1)
Return Final_bond_acc_no
Else
Return val.ToString()
End If
End If
End Function
i stepped through the code and after it returns something i cant bind the Data, i get an Exception
<%# clsFlow.CleanBondNumber(Eval("ATB_NUMBER"))%> '=' expected.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
CommandName='<%# GetCommandNamebunit(Container.DataItem) %>'
And in code behind
Function GetCommandNamebunit(ByVal dataItem As Object) As String
GetCommandNamebunit = "demotext"
GetCommandNamebunit = String.Empty
Dim texpinnerText = DirectCast(dataItem, Object).texp
Dim bunitinnerText = DirectCast(dataItem, Object).bunit
Dim rexpinnerText = DirectCast(dataItem, Object).rexp
Dim bunitid = DirectCast(dataItem, Object).id
Dim Str_blevel
Dim str_alig
Dim str_TFrame
Dim str_bunit
Dim str_fiscalY
Str_blevel = sltBusinessLevel.SelectedValue
str_alig = sltAlignmentLevel.SelectedValue
str_TFrame = sltTimeFrame.SelectedValue
str_bunit = sltBusinessUnit.SelectedValue
str_fiscalY = sltFiscalYear.SelectedValue
If str_alig = 1 Then
If Str_blevel < 4 Then
If texpinnerText <> "0" Then
GetCommandNamebunit = "sendModuleValues"
End If
Else
If texpinnerText <> "0" Then
GetCommandNamebunit = "setonefacility"
End If
End If
Else
If Str_blevel < 3 Then
If texpinnerText <> "0" Then
GetCommandNamebunit = "sendModuleValues"
End If
Else
If texpinnerText <> "0" Then
GetCommandNamebunit = "setonefacility"
End If
End If
End If
End Function
This is working fine for you can take help from this.
Anuj
modified 14-Nov-11 3:24am.
|
|
|
|
|
Hello all,
I work for a small IT firm and I have been assigned a task to work with few in-house developers in developing our internal Employee Portal which include, Time Tracker System, HR Portal, Performance Tracker and Asset management System, All deployed on one Windows Small Business Server.
The requirements gathering and documentation is almost done and we are about to start working on core development.
However, as I lack a project level knowledge while developing web applications. Can I get help on what best practices should I be implementing even from the database design stage?
The application is intended to be interacted by close to 200 people and half of them concurrently, at times. Most of the data tables are expected to be use by different modules of the same application.
Any help with guidelines to be followed while designing the database and application layers, will be greatly appreciated.
Any freelancing or consulting help is also invited. You can send me an email sunilsasadm@gmail.com
Thank you.
|
|
|
|
|
I think there are other forums within CodeProject that may be a better place to post your question to.
|
|
|
|