|
|
LATEST ...means new controls..
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Hi,
U can download it from http://www.asp.net/AJAX/ajaxcontroltoolkit/
|
|
|
|
|
Hi all
I m using regularexpressionvalidator to validate email id.
i have a submit button to submit the page.i m calling some javascript onclientclick of submit button.
now i want to check that regularexpressionvalidator is valid or not onclientclick of that submit button....
how can i do this....
Please Help me...
thanks in advance...
Amit Metkar
3i-infotech, Mumbai.
|
|
|
|
|
The "Regular Expression" Validator will validate when they type something in and it is not correct. The Validator will check onBlur.
Regular Expression Does not make the field "Required"
You still need to add a validator to require the field as well.
EDIT
"now i want to check that regularexpressionvalidator is valid or not onclientclick of that submit button...."
This already happens when they type in the text box. unless they leave it blank, this ALREADY happens. why dont you build it first and actually try the control.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
modified on Friday, May 23, 2008 2:03 AM
|
|
|
|
|
Hi,
Write javascript function for example ValidatePage() call this in OnClientClick event of Submit Button like this
function ValidatePage()
{
Page_ClientValidate();
if (Page_IsValid)
{
return false
}
else
{
return false;
}
}
<asp:button onclientclick="Javascript: return ValidatePage();">
or
in page_load add this line
btnSubmit.add.Attributes('onClick','return ValidatePage();')
|
|
|
|
|
Hi All,
I have to display images from SQL Databasse and display them in gridview It is actually a News Module where i have to show more than one image for a particular Subject.how can i show 2 or more mages in gridview
Thanks in Advance
Harisha
|
|
|
|
|
You write a HTTP handler and put urls to that handler in your image controls in your grid. You'd pass the id of the image to load through on te URL
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
hello friends,
I want to change the property of div dynamically such as depending on the condition sometimes its display to block or none;
Plz help me how to do this from codebehind...
Deepak Nigam
|
|
|
|
|
Hi,
You can declare div tag as Server control using runat attribute of div tag then only you can access it from codebehind
To block div tag use this code in codebehind
divId.Style.Add("display","block")
Cheers..!
Vijay s
|
|
|
|
|
Hi,
Can any one tell me how to download the open office document from an ASP.Net Applica1tion?
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi,
Which are the different and efficient way to show PPT files in ASP.net webpages. The page should works on all browsers and platforms.
Our requirement is like this,
1. User will upload a PPT file
2. Other users can view this slide only through webpage.
3. User should not download this file
4. page should works on all browsers(latest versions) and platforms
|
|
|
|
|
Did you try Zoho Show?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Thnaks for your response. To use ZOHO show we need to create presentations using this application . In our case the users are creataing application using Microsoft Power Point . ZOHO is not free for commercial use .
|
|
|
|
|
Hello,
<asp:gridview>
...
>
<columns>
<asp:templatefield headertext="Price" itemstyle-cssclass="cartPrice" headerstyle-cssclass="cartRowHeader">
<itemtemplate>
<asp:label runat="server" text=""><![CDATA[<%# String.Format("{0:c}",Eval("Price")) %>]]>' />
</asp:label></itemtemplate>
</asp:templatefield>
<asp:templatefield showheader="false" itemstyle-cssclass="cartTimes">
<itemtemplate>
<asp:label runat="server" text="x" />
</itemtemplate>
</asp:templatefield>
...
Actually it is a shopping cart. Pictorial representation is
Item Price Qty Total
1 2 1 $2
subtotal $2
"Your creditcard will be charged on shipping: $2"
I need to place a message as below:
Your creditcard will be charged on shipping: $2.
Now the length is to big so it distorts the grid view any idea?
Regards,
Pavas
|
|
|
|
|
Hi,
The trick sits inside ItemRowDataBound.
If this is my GridView definition, with 3 columns:
<asp:GridView ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound" ShowFooter="true" ..... >
Then my function looks like this:
public void GridView1_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells.RemoveAt(2);
e.Row.Cells.RemoveAt(1);
e.Row.Cells[0].ColumnSpan = 3;
e.Row.Cells[0].Text = "Total creditcard is 5 dollar";
}
}
So first I check if we are in the footer, then I start deleting the cell I don't want, and then I span the first cell over the whole width, and sets its text.
Hope this helps.
|
|
|
|
|
When the page loads, the datareader fills in the textboxes with data.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Conn.Open()
Dim strSQL As String = "SELECT tblNieuws.ID, tblNieuws.Titel, tblNieuws.Inhoud, tblGebruikers.Naam, tblNieuws.Datum FROM tblGebruikers INNER JOIN tblNieuws ON tblGebruikers.GebruikerID = tblNieuws.GebruikerID WHERE ID='" & Session("ID") & "'"
Dim cmdLogin As New System.Data.SqlClient.SqlCommand(strSQL, Conn)
Dim reader As System.Data.SqlClient.SqlDataReader
reader = cmdLogin.ExecuteReader()
While reader.Read()
berichtid = reader.GetValue(0)
txtTitel.Text = reader.GetValue(1)
txtBericht.Text = reader.GetValue(2)
DropDownList1.SelectedValue = reader.GetValue(3)
txtdatum.Text = reader.GetValue(4)
End While
reader.Close()
Conn.Close()
End Sub
When the data is filled in by the reader, the textboxes can be altered by the user.
But for some reason, when the button is clicked after the new user input is filled in, the .text of the textboxes is still outputting the data from the reader instead of the user input.
Protected Sub btnverzenden_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnverzenden.Click
Dim strtitel As String = txtTitel.Text
Dim strbericht As String = txtBericht.Text
Dim strdatum As String = txtdatum.Text
...
I don't know what the problem is.
Thanks for any help!
|
|
|
|
|
hey what you need to do is in the Page_Load add an "if block"
if (!Page.IsPostBack)
{
put page load code here
}
this will check to make sure the page is loading for the first time or not essentially.
what's happening is when the button is pushed the page "reloads" because of the post back and then it runs that code again and replaces the fields.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
I knew the solution was going to be really simple! Thank you!
Now I have another little problem though:
While reader.Read()
berichtid = reader.GetValue(0)
txtTitel.Text = reader.GetValue(1)
txtBericht.Text = reader.GetValue(2)
DropDownList1.SelectedValue = reader.GetValue(3)
txtdatum.Text = reader.GetValue(4)
End While
reader.GetValue(0) isn't producing any output, while it should be
giving the ID of the selected row in the table.
The others are producing good outputs though.
Can you help me with this? Thank you again =)
|
|
|
|
|
reader[0].ToString()
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
I have a gridview populating records at runtime,want to add a empty new row on click of a button(but the button is outside the grid) and the newly created rows with values should be saved in db
If you could send me a sample code abt the req it would be more helpful
|
|
|
|
|
what you need to do is add an "Insert Command" to the gridview
here is a code to an example with code doing this:
http://geekswithblogs.net/casualjim/articles/51360.aspx[^]
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
I found how to write an entire GridView to a new excel file but what I am wanting is to just write
like Textbox1.Text to row 7 cell 3.
How would I go about doing this?
|
|
|
|
|
you would use the Microsoft SDK for controlling office in .NET to do that.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|