|
You might need to convert objReturnParam to an integer
|
|
|
|
|
Saba02 wrote: objReturnParam.Value
Can you pass this to Convert.ToInt32() ?
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
|
|
|
|
|
Saba02 wrote: if (objReturnParam.Value > 0)
{
lblResult.Text = "UserName already exists or you are already a registered user!";
return false;
}
You need to convert the parameter value to integer.
if (Convert.ToInt32(objReturnParam.Value) > 0)
{
lblResult.Text = "UserName already exists or you are already a registered user!";
return false;
}
|
|
|
|
|
Thank you for your responses
Hoda
|
|
|
|
|
I have put on some controls on page and i am using AJAX...
<code><table id="TABLE1" style="width: 100%">
<tr>
<td>
Item</td>
<td colspan="4">
<asp:dropdownlist id="DDL_Item" runat="server" datasourceid="Itemsource" datatextfield="description" datavaluefield="code">
</asp:dropdownlist>
<asp:sqldatasource id="Itemsource" runat="server" connectionstring=""><![CDATA[<%$ ConnectionStrings:Conn %>]]>"
SelectCommand="Fill_Price_Item_Dropdown" SelectCommandType="StoredProcedure"></asp:sqldatasource>
</td>
</tr>
<tr>
<td>
Date From:</td>
<td>
<table>
<tr>
<td><asp:textbox id="TextBox_Date_From" runat="server"></asp:textbox></td>
<td>
<img id="Btn1" src="../images/CalImage.gif" /></td>
</tr>
</table>
<cc1:calendarextender id="CalendarExtender1" runat="server" format="dd/MM/yyyy" popupbuttonid="Btn1">
targetcontrolid="TextBox_Date_From"></cc1:calendarextender>
</td>
<td>
</td>
<td>
To</td>
<td>
<table>
<tr>
<td>
<asp:textbox id="TextBox_Date_To" runat="server"></asp:textbox></td>
<td>
<img id="Btn2" src="../images/CalImage.gif" /></td>
</tr>
</table>
<cc1:calendarextender id="CalendarExtender2" runat="server" format="dd/MM/yyyy" popupbuttonid="Btn2">
targetcontrolid="TextBox_Date_To">
</cc1:calendarextender>
</td>
</tr>
<tr>
<td>
Zone</td>
<td colspan="4">
<asp:updatepanel id="UpdatePanel1" runat="server">
<contenttemplate>
<asp:dropdownlist id="DDL_Zone" runat="server" datasourceid="Zone_src" datatextfield="Zone_Name" datavaluefield="Zone_Code" autopostback="True" onselectedindexchanged="DDL_Zone_SelectedIndexChanged">
</asp:dropdownlist><asp:sqldatasource id="Zone_src" runat="server" connectionstring=""><![CDATA[<%$ ConnectionStrings:Conn %>]]>"
SelectCommand="SELECT DISTINCT [Zone_Code], [Zone_Name] FROM [Zone_Master] WHERE ([isdeleted] = 0)">
<selectparameters>
<asp:parameter defaultvalue="0" name="isdeleted" type="Int32" />
</selectparameters>
</asp:sqldatasource>
</contenttemplate>
</asp:updatepanel>
</td>
</tr>
<tr>
<td>
State</td>
<td colspan="4">
<asp:updatepanel id="UpdatePanel2" runat="server">
<contenttemplate>
<asp:dropdownlist id="DDL_State" runat="server" datasourceid="State_src" datatextfield="State_Name" datavaluefield="State_Code">
</asp:dropdownlist>
<asp:sqldatasource id="State_src" runat="server" connectionstring=""><![CDATA[<%$ ConnectionStrings:Conn %>]]>"
SelectCommand="SELECT [State_Code], [State_Name] FROM [State_Master] WHERE ([Zone_Code] = @Zone_Code)">
<selectparameters>
<asp:controlparameter controlid="DDL_Zone" defaultvalue="0" name="Zone_Code" propertyname="SelectedValue">
Type="String" />
</asp:controlparameter></selectparameters>
</asp:sqldatasource>
</contenttemplate>
<triggers>
<asp:asyncpostbacktrigger controlid="DDL_Zone" eventname="SelectedIndexChanged" />
</triggers>
</asp:updatepanel>
</td>
</tr>
<tr>
<td>
</td>
<td align="center" colspan="4">
<asp:button id="Button_Search" runat="server" text="Search" width="83px" /></td>
</tr>
</table></code>
on page load i m setting the default select option as follows..
<code><pre> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DDL_Item.DataBind()
DDL_Zone.DataBind()
DDL_State.DataBind()
DDL_Item.Items.Insert(0, New ListItem("Select", "0"))
DDL_Zone.Items.Insert(0, New ListItem("Select", "0"))
DDL_State.Items.Insert(0, New ListItem("Select", "0"))
TextBox_Date_From.Text = Now.Date.ToString("dd/MM/yyyy")
TextBox_Date_To.Text = Now.Date.ToString("dd/MM/yyyy")
TextBox_Date_From.Attributes.Add("readonly", "readonly")
TextBox_Date_To.Attributes.Add("readonly", "readonly")
End If
End Sub</pre></code>
but i m unable to set the "Select" option for zone ddl. I mean that the option is present in the DDL but the second option is highlited always...
I also tried this
DDL_Zone.Items.FindByValue("0").Selected = True
but it didn`t help... what can be that prob
|
|
|
|
|
try this
DDL_Zone.Items.SelectedValue = "0" or
DDL_Zone.SelectedValue = DDL_Zone.Items.FindByText("0").Value
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Do you mean that when someone clicks on the dropdownlist the select is not highlighted first or do you mean when someone clicks on the select value and then leaves the dropdown it doesnt store the select value?
|
|
|
|
|
What are you doing in the DDL_Zone_SelectedIndexChanged method? Any rebinding to the dropdown?
*jaans
|
|
|
|
|
Dear All,
In one of my application I have a main report and many sub-reports are linked to it.
As we know we can;t have a page header and footer.
So I thought of having 2 page headers in the main report and suppressing it is the first report and not in others.
Now I don't know how to get the sub report name in order to specify it in the suppressing criteria.
Can any one help in this regard?
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
In the internet explorer , how should I delete all the addresses in the address drop down list.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
You mean deleting browsing history of IE?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
yes
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
I'm not sure how this is related to asp.net but never mind
you need to delete your cache, something like tools - internet options and you will find it there
|
|
|
|
|
how should i do it programatically
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
check this out;
http://forums.asp.net/p/1118810/1741268.aspx
|
|
|
|
|
You can't do that using ASP.NET. You would need the user to download an application and start it on the client computer.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I am using a grid view.In that grid view there is a template field which contains a checkbox.And there is a external button which used to insert the selected values to databse. Im using paging in grid view.My problem is when i select values of multiple pages,only current pages values is taking.Other clicks are not taking.If i ckick two values out of 10 of first page and went to second page which contains 4 values and clicket one value.Then clicking the save button.Then only values in second page is getting saved.What should i do.I used session for keeping checking even in paging.
Can any one help??
|
|
|
|
|
Set CheckBox to AutoPostBack = true and when you load data on GridView load like this
if(!Page.IsPostBack)<br />
{<br />
}
Hope it will helps...
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
I have an ASP.NET.2 page which is performing massive inserts into a SQL 2005 database. The whole application (Code & Database) is set up on a hosted website. If I run it from my office, all runs OK, however when the user runs it (from another site) I get the following issue.
Sys.Webforms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned saw: 12152
We are both using the same version of IE6. Why would one instance fall over and the other be successful.
Can someone please help, as this is supposed to be a live application.
|
|
|
|
|
Because of faster network speeds, especially if a lot of data is being transferred over the web ?
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 )
|
|
|
|
|
The ObjectContainerDataSource is a new WebControl in the Web Client Software Factory. It allows you to design nice MVC code. Check it out if you do not know what it is.
Here is my question for someone that knows a bit about it:
Is there any way I can get the current Instance being displayed by the DataBound COntrol (say a DetailsView)?
For example, when the Deleted Event is fired I can access the Instance through the ObjectContainerDataSourceStatusEventArgs (like: e.Instance)
How can I get this Instance without having to fire a fake Deleted method?
|
|
|
|
|
following is the code i am writing to open a dialog box
string str1 = "window.showModalDialog('child.aspx',null,'status:no;dialogWidth:300px;dialogHeight:150px;dialogHide:true;help:no;scroll:no');";<br />
ScriptManager.RegisterStartupScript(Page, typeof(Page), "", str1, true);
there is a button called close in the child.aspx page.
in clicking the button , i want to close the window.
if (!Page.IsPostBack)<br />
{<br />
<br />
string str = "window.close();";<br />
Button1.Attributes.Add("onclick", str);<br />
}
but the code does not close the window.
Please help.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
<br />
if (!Page.IsPostBack)<br />
{<br />
<br />
string str = "window.close();";<br />
Page.RegisterClientScriptBlock("CloseWindow",str);<br />
<br />
Button1.Attributes.Add("onclick", str);<br />
}
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
btn_close.Attributes.Add("onclick", "window.close(); return false;");
<asp:Button ID="btn_close" CausesValidation="false" runat="server" Text="Close"/>
try that
|
|
|
|
|
i am opening an aspx page in the form of dialog box .
While i am using ur code , it is not even closing the window , but also opening the same page i pop up window
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|