BMXDad 23 Newbie Poster

What are you developing on? Visual Studio? What version?
Post your .cs page completely, including the using statements.
Post your aspx page completly.

BMXDad 23 Newbie Poster

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

When creating the menu, I'd create a custom user control (ascx) file with the following starter code:

    <ul class="nav">
            <li><a href="<%# Url.Content("~/home") %>">Home</a> </li>
            <li><a href="<%# Url.Content("~/contact") %>">Contact</a> </li>
    </ul>

When using Bootstrap, cutomize the colors and plugins here and save a lot of time:

Customize and download

BMXDad 23 Newbie Poster

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?

BMXDad 23 Newbie Poster

This might help you out ...

Web Site DB Connection

BMXDad 23 Newbie Poster

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.

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

His error ...

'GridView1' fired event RowDeleting which wasn't handled

... or am I missing something?

BMXDad 23 Newbie Poster

Have you tried debugging to see if its entering the method?

What IDE are you using ... Visual Studio? If so, go to the page in question and view it in the designer. Double click on the dropdown list and verify it goes to the correct OnSelectedIndexChanged method.

If its reaching the Response, try adding the bool in the redirect.

Response.Redirect("index.aspx", false);
BMXDad 23 Newbie Poster

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

Try setting width to 100%, to keep it contained with in the div.

BMXDad 23 Newbie Poster

No, but you could use a server side link. But unless you own the server thats not going to help you much.

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

A better option is to use the EntLib (Enterprise Library) collection.

EntLib Download Site

BMXDad 23 Newbie Poster

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)
        {

        }
BMXDad 23 Newbie Poster

Is there a link to view the site, or is it local? If local could you post the page source from the browser?

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

yea ... now that I re-read it, that could be ... so ...

marta ... like Dani said, its a way to store information that can be used to make a web site dynamic, and be more efficiant in storing the information it show to the user.

There, that should cover everything ;-)

BMXDad 23 Newbie Poster

Isn't a non-editable div read only?

Maybe put the spellchek attribute on the hidden input field?

BMXDad 23 Newbie Poster

Simply, it ties two table togeather.

For example, You have two table ... one called blog, with a column called catId, and another called catagory. Add a business rule that states a blog entry must contain a category.

If you have a relationship between blog and category, where the reference is on blog.catId and cat.id, then you would not be able to add a row in blog, without making sure there was an entry in blog.catId pointing to an available choice/row in category.

BMXDad 23 Newbie Poster

This is what I get for a link, no page or anchor ... is this static or dynamic content?

http://unikorndesigns.com/ashish/#

BMXDad 23 Newbie Poster

Try converting to SqlDateTime, and remember ... SQL Server does not recognize dates prior to 1/1/1753

BMXDad 23 Newbie Poster

Should be :

Response.Redirect("index.aspx");

Notice the Capital R on redirect

BMXDad 23 Newbie Poster

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 ;-)

BMXDad 23 Newbie Poster

Are they supposed to be defaulting to a hash tag(#)s

BMXDad 23 Newbie Poster

No, it does not connect with database ... just a random response is needed.

BMXDad 23 Newbie Poster

After selecting from the dropdown, are you rebinding the grid? Should happen on the selectedIndexChange event.

BMXDad 23 Newbie Poster

Not always compliled, compare a web site vs web application. But that is usually the big difference.
Another difference is mainatainability. New sites, if code in an OOP style, are much easier to maintain or modify.

BMXDad 23 Newbie Poster

Nothing ... both do the same thing. "Classic" ASP is the first rendition of Microsoft’s version of Active Server Pages. ASP.Net is a total overhaul of the original concept allowing a larger separation of content and data. To the end-user, it’s all the same. To the programmer it’s the difference between haven and hell, with classic asp being hellish to maintain ... ;-)
There was a reason they called it spaghetti code.

BMXDad 23 Newbie Poster

Ummm ... isn't this is a SQL question? You might have better results that way.

As for the dropdown stuff, just grab the DropDownList.SelectedValue for each value, add it to a sql attribute then send it to a stored procedure, something like this:

private void UpdateStudent()
{
    string ddl1 = DropDownList1.SelectedValue;
    string ddl2 = DropDownList2.SelectedValue;
    string studentID  = (string)Session["StudentId"];
    string classID  = (string)Session["classId"];
    string connect = System.Configuration.ConfigurationManager.ConnectionStrings["ConnString"].ToString();
    SqlConnection conn = new SqlConnection(connect);
    string sp = "do_UpdateSomething";
    SqlCommand cmd = new SqlCommand(sp, conn);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.AddWithValue("@Param1", ddl1);
    cmd.Parameters.AddWithValue("@Param2", ddl2);
    cmd.Parameters.AddWithValue("@StudentId", studentId);
    cmd.Parameters.AddWithValue("@ClassId", classID);
    conn.Open();
    cmd.ExecuteNonQuery();
    conn.Close();
}

You might want to consider using the Enterprise Library for data work, if you haven't already ... saves a ton of time and effort.
http://msdn.microsoft.com/en-us/library/ff648951.aspx

BMXDad 23 Newbie Poster

The foreach will move throught the list of items i in ddlX.Items, and stop when the last one is read. So that should be fine.

Question though ... What is a.XDescription? Is it a string object? If not it'll need to be converted or cast to a string to get a match.

BMXDad 23 Newbie Poster

Did it work?

BMXDad 23 Newbie Poster

They match now, right? Case sensitivy?

BMXDad 23 Newbie Poster

@TonyG_cyprus ... Just a little FYI ... Bootstrap is a framework to build on, you still need knowledge of Typography, Color usgae, Usability and Accessability to make a good site that anyone can use, and as for the '500 times more code than is needed' ... thats why you take only what you need, which tells me you have no clue on what it is. Why reinvent the wheel each time you make a car?

@garyjohnson ... Bootstrap and others like it help, both professional and hobbist alike. The people who create and maintain it are drivers in what you see today. Why waste that talent? Check it out yourself and get some ideas on how they are doing things. Good luck with the site ...

BMXDad 23 Newbie Poster

Some of his information is outdated, but it still works ...
http://www.ironspider.ca/graphics/alignment.htm

BMXDad 23 Newbie Poster

Couple things I see ...

  • More contrast between background colors and foreground (text) colors.
  • You might consider using a frame work ... my suggestion is the Twitter booststrap one:
    http://twitter.github.io/bootstrap/index.html
  • Make sure you optimize your pictures ... be sure to re-scale them to the size your using. No need to have a 3000px X 1500px image to be shown in a 300px X 150px size. Use png for big stuff.
  • Check/Verify all your links and mailto's. There are some bad mailto's on this site, which I assume is yours ... ie: cakesbystewart@comcasy.net? It shows as cakesbystewart@comcast.net though.
    http://cakesbystewart.net/

PM me if you need any help ... I do free stuff for small business' :-)

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

You might want to rethink the Database layout that your thinking of using ... the masterpage switching is the easy part ... good luck.

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

Are you using ajax? If so, be sure to register the controls so the DOM can be updated properly.

BMXDad 23 Newbie Poster

If you mean to save them in a database? If so, you'll need to encode them going in and then decode them when populatinging the textbox.

string toDatabase = Server.HtmlEncode(text);

string fromDatabase = Server.HtmlDecode(htmlEncoded);
BMXDad 23 Newbie Poster

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

BMXDad 23 Newbie Poster

Try a jQuery auto-complete dropdown ... easy to setup and works pretty good.

Here's an example, but there are many others: http://blogs.msdn.com/b/josephkiran

BMXDad 23 Newbie Poster

Easy ... add a text box and button. On button click, take the text box entries and put them in a vairable. Use that variable in a parameter to call a stored procedure.

Depending on what your searching for, you might want to restrict what the user is using for searching ... ie: use dropdowns, checkboxes and radio buttons. That would be a lot safer and easier then an open ended box.

FYI ... doesnt matter how many layers your app has ... if you have a data layer, just call it and use it. Hardest part is going to be making a search form that guides the user through the process ... and is accessiable!

BMXDad 23 Newbie Poster

Make sure your calling you JavaScript after referencing your jQuery. If you simply cut and pasted the code then any JavaScript calls from the top section should be moved to the bottom of the page, under the jQuery reference calls.

BMXDad 23 Newbie Poster

Show some of the code for dal().

BMXDad 23 Newbie Poster

On the databind event, have you tried checking for and converting any null values to an empty string?

BMXDad 23 Newbie Poster

Create an instance of the Master page, find the control on master page and do what you need to do ... don't make it overy complicated.

In the example below I have a label on the master page called "lblMasterPageLabel".
In the content page that is referencing the master page I can write to that label like this:

        MasterPage mp = new MasterPage();
        mp = Master;

        Label lb = (Label)mp.FindControl("lblMasterPageLabel");
        lb.Text = "Found It";`
BMXDad 23 Newbie Poster

File extension is .png]? Check your code for a missing quote or miss-named image.

BMXDad 23 Newbie Poster

Are you rebinding after the click event?