|
|
Hi every body!
I am developing application in ASP.NET 2.0 and C#. I have a page with few text boxes, i attached some required field and regular expression validators with text boxes. there are two buttons on page, one is "Submit" and other is "Cancel".
when user clicks "Submit" button validators validate the conrols and every thing goes fine, i called client side click event on "Cancel" button which resets the values in text boxes. the problem is that when i press "Cancel" button the validators comes to action and gives error.
Can any body tell me how to tackle this problem?
Thanks in advance...
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
modified on Wednesday, January 16, 2008 8:43:27 AM
|
|
|
|
|
Affan Toor wrote: the problem is that when i press "Cancel" button the validators comes to action and gives error.
Did you consider setting CausesValidation to false for the cancel button?
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
|
|
|
|
|
Thanks for reply, i have rechecked, CausesValidation is set to false for cancel button...
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
You need to check ValidationGroup property. Set same validation group name for your validators and submit button. Don't set any validation group for cancel button. This will solve the problem.
|
|
|
|
|
I have created a crystal report and subreport within it. When i click on the main reports on a column (eg: Rolename) , the subreport values are displayed. Its working fine. But when i print, the values in the subreport, it is not getting printed. How do I print the main report and subreport in a single sheet. Is it possible with current subreport. If not can u pls help to do it in the most suitable way.
modified on Wednesday, January 16, 2008 10:12:02 PM
|
|
|
|
|
I have a Windows2000 based server, running many ASP.NET application. Occasionaly performance of the servers starts to degenerate enormously, and users start calling/complaining.
When I check I see the process 'aspnet.exe' taking up a huge amount of CPU.
Question now is, how do I find out which application is causing this problem?
Any suggestions?
|
|
|
|
|
AFAIK, there is no efficient way to find out which application is causing the problem. You can just check the event log for warnings and error messages, that might help you. Or analyze which website is getting more traffic and doing some heavy operations. That would be the one causing problem.
|
|
|
|
|
Hi all,
I want to have a button in a page like 'open File'. on which if user clicks, it should open open file dialog box to select a file and as soon as he clicks on the open button it should open the file (in same window or different window)
I tried using the "FileUpload 'Button but it comes in combination along textbox and button. but i need only button.
I tried in html view this is also the same thing
can anybody help me such that on button click it should open file select dialog box on local machine(where the user is accessing )select file and open it.
i know how to do it in windows app but i need to do it in web app.
Thanks in advance
ravikumar
|
|
|
|
|
|
If you set the visibility of the file input to display:none and use a separate input button to execute the file input click event, this will open the file dialog. The returned path is then available but it is not possible to open the file directly as this would be a security vulnerability.
<script type="text/javascript">
function openFileDialog()
{
document.getElementById('myFileDialog').click();
var filePath = document.getElementById('myFileDialog').value;
alert(filePath);
return false;
}
</script>
<input id="myFileDialog" type="file" style="display:none;" />
<input type="button" value="Open File Dialog" onclick="javascript:openFileDialog();" />
|
|
|
|
|
I have a an asp.net web application with C# page that sends username and password to an asp.net web application with C# but different application. I need to pass these data to the asp.net we bapplication but without using the Response.Redirect method. I tried to use the HttpWepRequest and HttpWebResponse ways.I use the following code in the source page:
string strId = "1";
string strName = "amino";
//string result ="";
ASCIIEncoding encoding = new ASCIIEncoding();
string postData = "userid=" + strId;
postData += ("&username=" + strName);
byte[] data = encoding.GetBytes(postData);
// Prepare web request...
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create("http://localhost:1644/TragetApp/Default.aspx");
myRequest.Method = "POST";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
myRequest.AllowAutoRedirect = false;
Stream newStream = myRequest.GetRequestStream();
// Send the data.
newStream.Write(data, 0, data.Length);
newStream.Close();
//Response.End();
//prepare response
Stream receiveStream;
HttpWebResponse myWebResp = (HttpWebResponse)(myRequest.GetResponse());
receiveStream = myWebResp.GetResponseStream();
//result = sr.ReadToEnd();
receiveStream.Close();
in the page_load of the target page i do the following to c the username:
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = Request["username"].ToString();//.QueryString["name"].ToString();
Response.Output.WriteLine(Request["username"].ToString());
}
I put a break poit in the page_load of the target page. The username is sent correctly to the target page but after i continue running i found that the displayed page is the source page.
I need to stop at the target page after receiving the username.
What can i do?
|
|
|
|
|
i have created a datagrid in my page(default.aspx) using the following code
<asp:datagrid id="DataGrid1" runat="server" autogeneratecolumns="False" onitemdatabound="DataGrid1_ItemDataBound">
<columns>
<asp:boundcolumn datafield="au_fname" headertext="au_fname"></asp:boundcolumn>
<asp:templatecolumn>
<headertemplate>
<asp:textbox id="txtgrid" runat="server"></asp:textbox>
</headertemplate>
<itemtemplate>
<asp:textbox id="txtgrid" runat="server"></asp:textbox>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
I am getting column of textboxes in design view. But on running the page i am not able to view
my purpose is to enter values through textbox. when i enter id in textbox corresponding name from database need to show in thenext column
can anyone please help me in this
thanks and regards
hari
|
|
|
|
|
are you binding the grid view on load or while showing the data? and is there in data present .
|
|
|
|
|
yes iam binding the grid on load in that i have the data
Kiran Kumar.P
|
|
|
|
|
1 - Step into code and verify your datasource is getting properly.
2 - Make sure your calling DataBind() after setting data source.
3 - Make sure your data source has values.
|
|
|
|
|
there is no data present. i actually dont want to bind it.. the purpose is i want to enter data into a number of rows where the number of rows is dynamic
|
|
|
|
|
Hai all
I have a Gridview in that i have a field chekbox .now user can selct the single or multilpe check
boxex at once and then he click the update button . the update button is not in the grid view its out of the gridview when user clik the button i need to modify the
selcted check boxes in database. the check box field value is 0(zero) or 1( one)
if he selected the checked the checked box we need to change the values in database to one
please give thecode..
Kiran Kumar.P
|
|
|
|
|
|
I have a report and one of the fields is a currency field.
I have set it to currency and it is displaying the currency as £ but I want the currency displyed as €.
Anyone any ideas how to change the currency?
macca
|
|
|
|
|
If you are using crystal report then format the field and customize the format and change the currency symbol.
Regards
Shajeel
|
|
|
|
|
Hi
I have an image button which has the following mouseover code in it:
onmouseover="this.src='loginbuttonover.gif'"
this works however when I put the loginbuttonover.gif in the images folder and use the following code it doesnt work:
onmouseover="this.src='~/Images/loginbuttonover.gif'"
the images folder does exist and is in the correct path
any help would be great
thanks
|
|
|
|
|
The ~/ syntax is used to get the root path when executed on the server side, however in this instance you are trying to execute it on the clientside where it is not understood.
This should work on the clientside:
onmouseover="this.src='Images/loginbuttonover.gif'" You can also add it on the serverside like this:
this.ImageButton1.Attributes.Add("onmouseover", "this.src='" + ResolveClientUrl("~/images/loginbuttonover.gif") + "'");
modified on Wednesday, January 16, 2008 6:43:54 AM
|
|
|
|
|
Hi All,
i have purchased a webspace for a travel agency website.
i want to create email ID in the above Webspace.
what are the requirements for solve the above problem.
By
Garvasis
|
|
|
|
|
georgegarvasis wrote: i want to create email ID in the above Webspace.
It has nothing to do with ASP.NET. You may consult your service provider. BTW , are you trying to create it using ASP.NET ?
|
|
|
|