|
I’m USING VB 2005 to write web forms (ASP.NET). In the tutorial it tells me to display the page in design view and then select DOCUMENT from the object list box at the top of the property window, then find the DefaultClientScript property and change it to VBScript. The problem being is that I can not find this property.
Help please, as I'm new to the ASP.NET environment.
Regards
Graeme Guildford.
I am always greteful for any help!
|
|
|
|
|
DefaultClientScript Property
http://msdn2.microsoft.com/en-us/library/7y9x7bh2(VS.80).aspx
How to: Set the DefaultClientScript Property of a Web Page
http://msdn2.microsoft.com/en-us/library/5y06x9d7(VS.80).aspx
if you dont find it then just put this line in ur page
<br />
<meta content="text/VBScript" http-equiv="content-script-type" /><br />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Than you so much. I did rate your message and I am so grateful for your help. This is my first time with ASP.NET.
That line of code you wrote, where in the page is it inserted?
Thanks again
Graeme
I am always greteful for any help!
|
|
|
|
|
>>where in the page is it inserted?
put it between HEAD HTML tag of your page..
>>I did rate your message
Thanks a lot. Graeme
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Michael
Thank you very much. It worked a treat!!!!
Like I said this is the first time I've ventured into ASP.NET using VB 2005. The text book I'm studying from mis-lead me to changing the DefaultClientScript through the DOCUMENT property window, where I couldn't find the DefaultClientScript property. I did notice that one other programmer had the same problem where the BETA version of ASP.NET 2.0 had the property and the later release didn't.
Thanks again.
Regards
Graeme
I am always greteful for any help!
|
|
|
|
|
Hi all
Is there anyway in which i can ensure that when a user selects a textbox, that the enter button is automatically set to the button which inputs the textboxes text. Because after inputting into the textbox i do not want the user to have to manually click on a button to input the value.
Thanks or any help in this regard...
Devin
|
|
|
|
|
here is it how it works in ASP.NET:
When you press enter on a webform, the very first Button will fire click event. If you really want with some other button, you will have to manupulate on if(!IsPostBack) on page load.
Cheers
|
|
|
|
|
You can use the focus() funcxtion on the event of the textbox....
like ontextchange write a javascript and set focus on the button of your choice...
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Actually, there are ways.... (there is always a way...)
This is how I solved it - my page has two textboxes, one for login and one for search, and two submit buttone - one for each - but like you I wanted the user to to be able to hit ENTER and have the "right" submit made...
This method is not foolproof, but works well enough and on all PC platforms I've tried and some but not all Mac OS's... (but that's Macs for you...)
Tweak it suit, obviously, but this is it cut down it's bones:
OK... login and search, and their buttons:
Member login:
<asp:TextBox id="txtLogin" runat="server" />
Password:
<asp:TextBox id="txtPwd" runat="server" TextMode="Password" />
<asp:LinkButton runat="server" ID="lbGo" OnClick="SubmitLogin" Text="Go"></asp:LinkButton>
Search:
<asp:TextBox id="txtSiteSearch" runat="server" ></asp:TextBox>
<asp:LinkButton runat="server" ID="lbSearch" OnClick="SiteSearch" Text="Go"></asp:LinkButton>
and some Javascript for the head of your page:
<script language="javascript">
function login13(e) {
if (e.keyCode==13) { __doPostBack('lfLogin$lbGo',''); }
}
function search13(e) {
if (e.keyCode==13) { __doPostBack('lfLogin$lbSearch',''); }
}
</script>
and in your code-behind:
Private Sub Page_Load(ByVal Sender As Object, ByVal e As EventArgs)
If Not Page.IsPostBack Then
txtPwd.Attributes.Add("onkeyup", "return login13(event)")
txtSiteSearch.Attributes.Add("onkeyup", "return search13(event)")
End If
End Sub
Clearly you'll need to change both the javascript adn the code-behind to suit your controls' ID's... if you're not sure about the javascript __doPostBack arguments (NB the double-underscore) then run your page and look at the source as rendered in your browser and take the names from there...
Good luck....
Fred
|
|
|
|
|
Thanks very much all.. Will give it a try and post back should i encounter any difficulties.
Cheers
Dev
|
|
|
|
|
Hi experts
Is there a way to know what button was click within a form?
Here is my code:
<script language="javascript" type="text/javascript">
function Form1_onSubmit() {
alert("button clicked")
}
</script>
...
<form id="Form1" runat="server" onsubmit="return Form1_onSubmit()">
...
|
|
|
|
|
This doesn't look like an ASP.NET question to me. If you want to know what button was pressed, create button server controls and handle their click event.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Provably I didn't make myself clear,so I will describe exactly what I need to accomplish.
On a asp.net page there are 2 buttons(edit and save). I want to validate 2 fields only when the save button is clicked. If edit is clicked, then I don’t want to validate any fields. I thought that using javascript I can identify which button was clicked. If (save button) then validate, else don’t validate.
Thank you guys
|
|
|
|
|
I am using ReportViewer Control on my asp.net page. Report consists of three datasets with each having its own table. All thses three tables are vertically and horizonatlly aligned and have same numbers of columns. Report looks like a homgeneous single report. Output of report is on three pages since there are many rows. Page 1 and 2 displayes rows from dataset1/Table1(it has large amout of data compared to other two datasets) and last page has remaining rows from dataset1/table1 and and rows from dataset2/table2 and dataset3/table3. While on page 1 and 2 vertical scrollbar runs fine but on page 3 vertical scrollbar crashes as soon as one tries to scroll with follwoing errror message:
Microsoft JScript runtime error: 'children.0.children.0.children.1.children' is null or not an object.
Horizontal scrollbar runs ok without any problme. While in preview mode and after deploying and viewing on server itself Report does not crash. It crashes only while viewing on ReportViewer Control on webpage in asp.net application. Any help to solve this problem will be highly appricated and I would like to thank you in advance.
Thank you.
Bharat Gadhia
|
|
|
|
|
I found the culprit!! By setting FixedHeader property to false the crashing behaviour is stopped. But now how to achieve FixedHeader without crashing is question.
Thank you.
Bharat Gadhia.
|
|
|
|
|
Does anyone know of a ASP YouTube Clone Script?
Thank you
Have an enjoyable and safe Holiday
|
|
|
|
|
Hi all,
I am trying to create a .csv file containing all the records returned from an odbc query but have so far ben unable to find any help on the matter.
I am using a standard odbc connection string etc. and executing the reader, but I don't know how to put the returned recordset into a .csv file.
Any help would be appreciated as this is the first time i've tried something like this and I'm still pretty new to .net
many thanks
mark
|
|
|
|
|
Sir,
Can any body tell me any sites or downloads for taking support in Biztalk server 2004 development. Because am new to this field. pls. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Wow! This new thing called Google returned over 1 million records about Biztalk 2004! And since it's a Microsoft product, I'm sure msdn would not have a single article about it.
______________________
stuff + cats = awesome
|
|
|
|
|
Yes, I have been trying with google but, really I couldnt find what I want. I want a link which can explain me about all the development concepts starting from schemas to orchestration and property schemas and adpapters all development with examples atleast with one example.
Could u pls help me in this regards. I would feel very thankfull to u.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Better Buy a Book Related to Biztalk 2004 and read it.
Otherwise you could not understand.
As leckey said there are lot of links are there since that could not help you means better buy a book and start practicing the code.
Regards,
Satips.
|
|
|
|
|
Dear Satip,
Could u pls. advice me which is the best book to fit needs of all people like biginners to developers. I would be thankfull to you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi
Well basically I want to create some sort of rating system, usuing the ajax ratng control, below is an overview.
1. User rates page via rating control, selecting 1- 5 stars via clicking on them.
2. The value then tgets stored in a database
3. The top five pages with the highest numbers, a link gets displayed to the web page on the home page
http://www.codeproject.com do something, almost identical to this, but the one thing I dont understand is that the website will have around 1k of pages, therefore wont this be really slow? and how will I add the values up each time a page is rated?
Any help appreciated
Thanks
|
|
|
|
|
using a grid i have created two rows by binding the hidden template field
with a datasource in pageload event,
Now i have to Add a new row in the grid using a button click....maitaining the values in the textbox in the grid entered by user....
=========================
/*
<asp:datagrid id="dgLocsch" runat="server" width="80%" cssclass="lbl_font" autogeneratecolumns="false">
<columns>
<asp:templatecolumn visible="false">
<itemtemplate>
<%# Eval("ROW") %>
<asp:templatecolumn headertext="Day From">
<headerstyle cssclass="sblue">
<itemtemplate>
<asp:textbox id="txtDayFrom" runat="server" width="50px">
*/
coding in page_load event is
===================================
protected void Page_Load(object sender, EventArgs e)
{
Addrow(dgLocsch, 2);
}
private void Addrow(DataGrid dg, int NoOfRows)
{
DataTable dt = new DataTable();
dt.Columns.Add("ROW");
for (int i = 1; i <= NoOfRows; i++)
{
DataRow dr;
dr = dt.NewRow();
dr["ROW"] = i.ToString();
dt.Rows.Add(dr);
}
dg.DataSource = dt;
dg.DataBind();
}
can any one help me......
thank u
|
|
|
|
|
Here is what you can do. Before you bind your grid (on page load, or whenever) store you dataTable in viewstate.
ViewState["yourDataTable"] = dt;<br />
<br />
<br />
private void Addrow()<br />
{<br />
DataTable dt = (DataTable)ViewState["yourDataTable"];<br />
<br />
int row = 0;<br />
<br />
while (row < dt.Rows.Count)<br />
{<br />
<br />
TextBox txt = (TextBox)this.GridView.Items[row].FindControl("txt");<br />
dt.Rows[row]["txtValue"] = txt.Text;<br />
<br />
<br />
row += 1;<br />
}<br />
<br />
DataRow dr;<br />
dr = dt.NewRow();<br />
dt.Rows.Add(dr);<br />
<br />
<br />
dg.DataSource = dt;<br />
dg.DataBind();
I didn't get any requirements for the signature
|
|
|
|