135 Posted Topics
Re: If Im not using the SQL Membership I usually call a helper class that has a few methods just for this. start here passing credentials: protected static bool LoginUser(string user, string pass) { Logger l = new Logger(); return l.IsUser(user.Trim(), pass.Trim()); } The IsUser Class: /// <summary> /// Check to … | |
Re: I'd go for ASP.Net. The languages that you can use are varied and the security available is some of the best. | |
Re: Generally, if its part of the page or menu structure then put it in the CSS, using the background-image property. If its part of the content, then in the markup. That way you can make sure the Alt tag is filled out properly and an individual that's using an AT … | |
Re: A very simple answer: Classic ASP is a scripting language and ASP.Net is a Compliled language. It all looks the same to the browser. | |
Re: Some code snips to get you going, and it includes sorting to. I'm creating a DataSet for the initial load but then creating a DataTable and storing it in ViewState for the paging. You could also, for efficiency, call only the page that is going to be shown, but thats … | |
Re: Like @geniusvishal said, No ... its a new Session. However, **if they open a seperate tab**, it will still be reading the same Session. Something to be aware of. | |
Re: Looks like an illusion ... the fiddle is working fine. | |
Re: Your hover style is going into effect (Lines 69 - 73). I'd replace the images with text, for real text and style accordingly. | |
Re: Try in container: `padding: 0 auto;` | |
Re: Its sloppy, but works. But first you need to add an ID to the table so you can find it. After that you can loop through it and get your values. table.ID = "dataTable"; protected void btn_Click(object sender, EventArgs e) { try { HtmlTable t = new HtmlTable(); t = … | |
Re: Only time you should redirect to a login page is if the user clicks a link to go there, or they've bookmarked a page that requires them to be authenticated. If they're just viewing public pages, then there is no reason to have a user login. | |
Re: You don't need to disable viewstate, you can bump up the allowable size in the web.config: <System.Web> <httpRuntime maxRequestLength="10000" /> </System.Web> Another thing to watch out for is HttpValueCollection Key size. This is how many data elements are allowed on a page. Out of the box its around 1000, which … | |
Re: How are you initiating a class and adding parameter values? | |
Re: Well ... you could view source and change hidden and/or disabled fields to visible and/or enabled. This in turn would allow you to post or get form information that would otherwise be unavailable. From there ... .anything is possible. | |
Re: Fill with a DataSet, not a DataTable? `Dim dt As New DataSet` | |
Re: Debug your code and make sure its being called. | |
Re: MS Visual Studio can be downloaded for free, and can support almost any language with the proper plugin. [Visual Studio 2012 Express](http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express) ![]() | |
Re: This will export a GridView to Excel protected void btnExport_Click(object sender, EventArgs e) { Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=FileName.xls"); Response.Charset = string.Empty; // If you want the option to open the Excel file without saving then // comment out the line below // Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/vnd.xls"; System.IO.StringWriter stringWrite = new System.IO.StringWriter(); … | |
Re: This is always a problem with tabular data on a phone or tablet ... just not enough room for a big table. What you could do is have a seperate table that is only shown, after the other is hidden, using media queries. Another option is to check for a … | |
Re: Look at your path where your calling the file. | |
Re: Do you still want the popup to show? | |
Re: If I'm reading you correctly, you want to be able to turn a group of links on and off from an admin page. To do so you would need a way to store the information, wheather they are visible or not and then be able to read that information on … | |
Re: Concatentate them into a string. string s = c_id.toString() + " - " + C_name.toString() + " - " + C_contact.toString(); chkList1.Text = s; | |
Re: Be sure to register both dropdowns in the scriptmanager. | |
Re: [Blog Engine](http://www.dotnetblogengine.net/) Open source blog that has everything you need. | |
Re: Boo on all caps ... makes it so hard to read. And beware the w3Schools, They have a **lot of incorrect information** ... alot!! Read this article ... might help you out: [Why you should not learn html](http://www.thedigitalshift.com/2013/03/roy-tennant-digital-libraries/why-you-should-not-learn-html/) | |
Re: Are you writing the code in a script tag or in a code behind page? Looks like a dynamically added image button is not posting back? | |
Re: Are you trying to add a query string to the current url, like this: http://current.website.com/index.aspx?zoom=true Try protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("default.aspx?zoom=true"); } | |
Re: Twitter Bootstrap is one of the best Mobile ready frameworks around, in my opinion. http://twitter.github.io/bootstrap/ Customise it to your color scheme and select only jQuery plugins your actully going to use ... and your ready to go. | |
Re: Its a jQuery Div. Empty it like this ... $('#Somediv').empty(); You can add code to create a cookie so if they come back to the site it won't show again. ![]() | |
Re: How are you clearing the Sessions and Forms Authentication? This should help: FormsAuthentication.SignOut(); Session.Clear(); If you are simply doing a back button on the page it will still show the page as if you were logged in, but on refresh it should be ok. | |
Re: Change it .... only submit the form after the input values have been validated. action="pagenamecheck.jsp" should be action="ValidateForm()" where ValidatedForm() is a function that validates the page first, then returns "pagenamecheck.jsp" if validation is good. | |
Re: Like JorgeM said, reasearch on your own first. Sites like this are to help other programmers. They're not a collection of free programmers to get work from. | |
Re: This might help you out ... [Web Site DB Connection](http://www.daniweb.com/software-development/csharp/threads/163420/creating-sql-database-connection-in-asp.net-web-application-through-c) | |
Re: Like this: HTML <form id="form1" runat="server"> <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True"> <asp:ListItem>One</asp:ListItem> <asp:ListItem>Two</asp:ListItem> <asp:ListItem>Three</asp:ListItem> </asp:DropDownList> <br /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <br /> <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /> </form> Code Behind: protected void Button1_Click(object sender, EventArgs e) { string sText = TextBox1.Text; TextBox1.Text = string.Empty; DropDownList1.Items.Add(new ListItem(sText,sText)); } | |
Re: There are no guildlines per say. Its a framework, not a template. With that said, you would grab one of the example pages, and copy the source into your site master or master template. [Basic HTML template](http://twitter.github.io/bootstrap/getting-started.html#html-template) When creating the menu, I'd create a custom user control (ascx) file with … | |
Re: This should get you started. http://www.codeproject.com/Articles/570682/PDF-File-Writer-Csharp-Class-Library ... but why a pdf file? Why not a page with a print friendly css attached to it? | |
Re: You have no handler for the RowDeleting event. This is c#, but you can convert it ... <asp:GridView ID="GridView1" runat="server" onrowdeleting="GridView1_RowDeleting"> protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { } | |
Re: Line 15 - 24 private void autofillyr(int incrementBy, int maxyr, int no_year) { for (int i = startYear; i < maxyr; i++) { if(i != no_year) year.Items.Add(new ListItem(i.ToString(), i.ToString())); i = i + incrementBy; } } | |
Re: If you add a padding of 1px to outside div it then has an edge to push from. <div style="width:700px;height:100px;background-color:silver; padding: 1px;"> <div id="week" style="margin:20px;border:2px solid red"> <div id="sfsf" style="margin:10px;"> Day Of The Week </div> </div> </div> | |
Re: No, but you could use a server side link. But unless you own the server thats not going to help you much. | |
Re: Try setting width to 100%, to keep it contained with in the div. | |
Re: Skin and theme files are kind of antiquated nowadays. Your better off with standard CSS. But if you need some, try this site: http://www.dotnettreats.com/samplethemes/ | |
Re: A better option is to use the EntLib (Enterprise Library) collection. [EntLib Download Site](http://entlib.codeplex.com/) | |
Re: Is there a link to view the site, or is it local? If local could you post the page source from the browser? | |
Re: Any blogging software will do ... Wordpress, BlogEnbgine are all good, and have a lot of predefined templates. ... and if your doing this for a US or Canadian polition, I'd stay away from anything overseas. Looks bad sending jobs that can be done locally to some other country. JMO … | |
Re: No ... but you could use css hacks. If your looking for diffent style sheets for each browser, then a conditional on the link is better ... IMO ` <!--[if lt IE 7]> <link rel="stylesheet" href="Content/IE7.min.css" /> <![endif]-->` But before doing that, you might want to see if you can … | |
Re: Try converting to SqlDateTime, and remember ... SQL Server does not recognize dates prior to 1/1/1753 | |
Re: Isn't a non-editable div read only? Maybe put the spellchek attribute on the hidden input field? | |
Re: Are they supposed to be defaulting to a hash tag(#)s |
The End.