BMXDad 23 Newbie Poster

Use jQuery

$("ul.nav > li a[href*='pageName']").parent("ul.nav > li").addClass("active");
BMXDad 23 Newbie Poster

Yes, you can even point your custom domian to it. There are some restrictions if your site has alot of traffic, but not to bad.

BMXDad 23 Newbie Poster

Your site host needs to be able to support IIS. Not all hosting sites do.

If they don't your either going to have to find a new host, serve it yourself or use a different language.

Azure is easy to use and free for a simple site.

BMXDad 23 Newbie Poster

Yes, call a stored procedure in the database that will list out the columns you want. Bind the results to the DataGrid.

BMXDad 23 Newbie Poster

Looks like your trying to convert "monster.co.uk" to an int

BMXDad 23 Newbie Poster

On the grids row databound event you can access and run your method that would fill the dropdown. You can even set selected item after its loaded, by using a hidden value in the gridview data.

BMXDad 23 Newbie Poster

Your code is going to fire as soon as the page is finished loading.

Try this, it works differently on IE and Firefox though:

$(window).bind('beforeunload', function() {
    alert("You are attempting to leave this page. Are you sure want to leave MSJ Bank Financial?");
});
BMXDad 23 Newbie Poster

You might want to rethink your database design. A catagory list should be a table lookup, which in turn is referenced in a data table.

You have a database diagram you could show?

BMXDad 23 Newbie Poster

Change <asp:Checkbox ID = "chklst" runat="server" /> to
<asp:CheckBoxList ID="chklst" runat="server" AutoPostBack = "true"></asp:CheckBoxList>

To add to it, do this in your .cs file

chklst.Items.Add('Happy Birthday');
chklst.Items.Add('Happy Happy Birthday');

BMXDad 23 Newbie Poster

Create a User class, and add it to a Session.

Session["User"] = Users.GetUser(1);
Then you can grab the Session["User"] to fill any info you need.

Users usr = (Users)Session["User"];

string pass = usr.Password;
string usrName = usr.UserName;

BMXDad 23 Newbie Poster

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 the page they are on.

An easy way is to handle this is to read and write to a simple text file. Not very secure, but it works well and is easy to implement.

BMXDad 23 Newbie Poster

Concatentate them into a string.

string s = c_id.toString() + " - " +  C_name.toString() + " - " + C_contact.toString();
chkList1.Text = s;
BMXDad 23 Newbie Poster

It needs to be a seperate list. You could also set a style:

style="float:right;"
BMXDad 23 Newbie Poster

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;
        }
    }
BMXDad 23 Newbie Poster

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/

BMXDad 23 Newbie Poster

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 solve the problem either with diffent css or with some minor ie spacing hacks.

This should work for all IE (pretty sure it still does). Just duplicate a class for IE

html>body someClass {
Something for IE here: 30em
}
BMXDad 23 Newbie Poster

If your doing any async postbacks prior to the submit, then the model will be emptied after the postback, unless you re-popluate it on each ajax call.

BMXDad 23 Newbie Poster

Try FormCollection in your controller and see if anything is coming through that way.

divin757 commented: That works but how could I make it work with a model? I have another page that is almost identical and it passes back a model like I would expect. +1
BMXDad 23 Newbie Poster

Create an instance of the popup control, and call it again.

This is an example creating an instance of a scriptmanager, on a master page, and registering a control ...

MasterPage Mp;
Mp = Master;
ScriptManager sm = (ScriptManager)Mp.FindControl("ScriptManager1");
sm.RegisterAsyncPostBackControl(somecontrol);`
BMXDad 23 Newbie Poster

Make sure that you call the popup again, in the button click event handler.

BMXDad 23 Newbie Poster

Just add a value to the "Text" attribute. If you need a dynamic entry you can set it from a public method.

<asp:TextBox ID="txtBox" Text="Default Value" runat="server" ></asp:TextBox>
BMXDad 23 Newbie Poster

Having the reference at the bottom will allow the page to render completely, before running any scripts that might need running. If I remember correctly, the page will stop rendering, if it encounters a script reference, to only continue when its been cached or ready to use. Something to think about when you have a script heavy page.

But for normal pages top or bottom will work fine.

BMXDad 23 Newbie Poster

Add this just under the closing form tag, line 105

 <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
BMXDad 23 Newbie Poster

Post the full html ... minus any content of course.

BMXDad 23 Newbie Poster

Sorry ... what I sent is for a button click. This works like you want I think.
http://jsfiddle.net/GBL4s/1/

<label for="business">
    <input type="checkbox" id="business">Business</label>
<div id="businesslist">
    <ul style="list-style: none;">
        <li>
            <label for="chk1">
                <input type="checkbox" name="chk1" id="chk1" class="sub" />First</label>
        </li>
        <li>
            <label for="chk2">
                <input type="checkbox" name="chk2" id="chk2" class="sub" />Second</label>
        </li>
        <li>
            <label for="chk3">
                <input type="checkbox" name="chk3" id="chk3" class="sub" />Third</label>
        </li>
        <li>
            <label for="chk4">
                <input type="checkbox" name="chk4" id="chk4" class="sub" />Fourth</label>
        </li>
        <li>
            <label for="chk5">
                <input type="checkbox" name="chk5" id="chk5" class="sub" />Fifth</label>
        </li>
        <li>
            <label for="chk6">
                <input type="checkbox" name="chk6" id="chk6" class="sub" />Sixth</label>
        </li>
        <li>
            <label for="chk7">
                <input type="checkbox" name="chk7" id="chk7" class="sub" />Seventh</label>
        </li>
    </ul>
</div>




$('#business:checkbox').change(function () {
    if ($('#business:checkbox').attr("checked")) $('.sub').attr('checked', 'checked');
    else $('.sub').removeAttr('checked');
});
BMXDad 23 Newbie Poster

You need a return value between the two curley brackets on line 18, like mentioned above.

BMXDad 23 Newbie Poster

Is there an id field in the table? if so, your SP can do the below.

select *
from    TableName
where   Id = (select max(Id)  from TableName)
BMXDad 23 Newbie Poster

It would be easier to do it in jQuery.

$(function () {
    $('#business').toggle(
        function() {
            $('#businesslist .subb').prop('checked', true);
        },
        function() {
            $('#businesslist .sub').prop('checked', false);
        }
    );
});
BMXDad 23 Newbie Poster

To split the string at the dash, with string str being the returned result ...

string s = str.Substring(str.IndexOf("-")+1, str.Length - (str.IndexOf("-")+1));