Monday, May 21, 2012

Rounded-Corners for Table


 .rounded-corners
   {
     -moz-border-radius: 20px;
    -webkit-border-radius: 20px;
    -khtml-border-radius: 20px;
    border-radius: 20px;
    background:#CC0000;
    width :40%;
    }
OR
write In table Tag
style="border-radius:15px"

Monday, May 14, 2012

upload Image in Gridview vb.net

Import System.IO

Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
        Try
            Dim s As String = FileUpload1.PostedFile.FileName
            Dim s1 As String = Path.GetFileName(s)
            FileUpload1.PostedFile.SaveAs(Server.MapPath("img/" + s1))
            Dim s2 As String = "../img/" + s1
            da = New SqlDataAdapter("insert into move(title,director)values('" + TextBox1.Text + "','" + s2 + "')", cn)
            ds = New DataSet()
            da.Fill(ds)
            GridView2.DataSource = ds
            GridView2.DataBind()
        Catch ex As Exception
            Response.Write(ex.Message)
        End Try
    End Sub

Wednesday, May 2, 2012

Textbox with background image using CSS


.searchBox{
background-image:url('images/magnifying-glass.gif');
background-repeat:no-repeat;
padding-left:20px;
}

Member login

Tuesday, May 1, 2012

Get Text and Value of Selected Item of ASP.Net RadioButtonList using jQuery


[head>
 [script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
   [script type="text/javascript">
        $("#demo").live("click", function () {
            var selectedItem = $("[id*=RadioButtonList1] input:checked");
            if (selectedItem.length > 0) {
                alert("Selected Value: " + selectedItem.val() + " Selected Text: " + selectedItem.next().html());
            } else {
                alert("Please select an item.");
            }
        });
    [/script>
[/head>
[body>
    [form id="form2" runat="server">
    [asp:RadioButtonList ID="RadioButtonList1" runat="server">
        [asp:ListItem Text="One" Value="1" />
        [asp:ListItem Text="Two" Value="2" />
        [asp:ListItem Text="Three" Value="3" />
    [/asp:RadioButtonList>
    [br />
    [input type = "button" id = "Button1" value = "Demo" />
    [/form>
[/body>
[/html>