|
Place you code inside a try/catch block and test for the number of rows returned first
try<br />
{<br />
DataTable dt = GetRecords();<br />
if( dt.rows.count == 0)<br />
label.Text = "No records found";<br />
else<br />
...<br />
}<br />
catch(Exception ex)<br />
{<br />
label.Text = ex.message;<br />
}
only two letters away from being an asset
|
|
|
|
|
We can send mail using System.Net.Mail namespace in ASP .NET. But do we have any API to read mails via POP server using ASP .NET? Please help as I have not come across any such thing. Will I be able to read every details of the mail i.e. all the headers and the body?
|
|
|
|
|
|
|
Hi...
I want to add functionality of drag and drop columns in gridview through javascript.
how can i do this....
Thanks.
Regards,
PUJA FALDU
|
|
|
|
|
i dont know what is the function of cookies in ASP.net and how to get the infromation stored in cookies
|
|
|
|
|
Muhammad Tufail 1979 wrote: i dont know what is the function of cookies in ASP.net and how to get the infromation stored in cookies
Have a look at this link
Beginner's Guide To ASP.NET Cookies
This may help you !
|
|
|
|
|
cookies are used to store the values in text files. Basically cookies are text files used to store data in it. So, the user can retrieve the data later from the cookies.
|
|
|
|
|
I think you're telling the wrong person.
|
|
|
|
|
|
Cookies are messages given to a Web browser by a Web server.
The main purpose of a cookie is to identify users and possibly prepare customized Web pages or to save site login information for you.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Manas Bhardwaj wrote: The main purposeSome possible uses of a cookie is to identify users and possibly prepare customized Web pages or to save site login information for you.
FTFY
|
|
|
|
|
I am trying to use an AnimationExtender to send blurb message in a details View. But failed to re enable the blurb button. Any type of help is appreciated Here is my code
Protected Sub dlSearch_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles dlSearch.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim itm As DataListItem = e.Item
Dim ani As AjaxControlToolkit.AnimationExtender = CType(itm.FindControl("OpenAnimation"), AjaxControlToolkit.AnimationExtender)
ani.TargetControlID = "btnInfo"
'ani.OnClick.Children(0).Properties("AnimationTarget") = ani.FindControl("btnInfo").ClientID
Dim str22 As String = ani.OnClick.Children(0).Properties("AnimationTarget")
ani.OnClick.Children(1).Properties("Script") = "Cover($get('" + ani.FindControl("btnInfo").ClientID + "'), $get('flyout'));"
Dim anic As AjaxControlToolkit.AnimationExtender = CType(itm.FindControl("CloseAnimation"), AjaxControlToolkit.AnimationExtender)
anic.TargetControlID = "btnClose"
Dim str As String = anic.OnClick.Children(7).Properties("AnimationTarget")
End If
End Sub
-----------------------------------------------------------
<asp:DataList ID="dlSearch" runat="server" DataKeyField="ProfileId">
<HeaderTemplate>
<asp:CheckBox ID="checkMain" runat="server" Text="Check All" onclick="checkunchkall(this);" />
<%-- <input id="checkMain" type="checkbox" runat="server" Text="Check All" onclick="checkunchkall(this);" />--%>
</HeaderTemplate>
<ItemTemplate>
<table>
<tr>
<td Width="130">
<%-- <input id="chkAll" type="checkbox" Text="Select this Profile" runat="server" />--%>
<asp:CheckBox ID="chkAll" runat="server" Text="Select this Profile" />
</td>
<td align="right" colspan="2">
<asp:HyperLink ID="HyperLink1" Text="View Similar Profile" runat="server"></asp:HyperLink>
<asp:Button ID="btnInfo" runat="server" OnClientClick="return false;" Text="Send Blurb"/>
<ajaxToolkit:AnimationExtender id="OpenAnimation" runat="server" TargetControlID="btnInfo">
<Animations>
<OnClick>
<Sequence>
<%-- Disable the button so it can't be clicked again --%>
<EnableAction AnimationTarget="btnInfo" Enabled="false" />
<%-- Position the wire frame on top of the button and show it --%>
<ScriptAction Script="" />
<StyleAction AnimationTarget="flyout" Attribute="display" Value="block"/>
<%-- Move the wire frame from the button's bounds to the info panel's bounds --%>
<Parallel AnimationTarget="flyout" Duration=".3" Fps="25">
<Move Horizontal="-280" Vertical="10" />
<Resize Width="260" Height="100" />
<Color PropertyKey="backgroundColor" StartValue="#AAAAAA" EndValue="#FFFFFF" />
</Parallel>
<%-- Move the info panel on top of the wire frame, fade it in, and hide the frame --%>
<ScriptAction Script="Cover($get('flyout'), $get('info'), true);" />
<StyleAction AnimationTarget="info" Attribute="display" Value="block"/>
<FadeIn AnimationTarget="info" Duration=".2"/>
<StyleAction AnimationTarget="flyout" Attribute="display" Value="none"/>
<%-- Flash the text/border red and fade in the "close" button --%>
<Parallel AnimationTarget="info" Duration=".5">
<Color PropertyKey="color" StartValue="#666666" EndValue="#FF0000" />
<Color PropertyKey="borderColor" StartValue="#666666" EndValue="#FF0000" />
</Parallel>
<Parallel AnimationTarget="info" Duration=".5">
<Color PropertyKey="color" StartValue="#FF0000" EndValue="#666666" />
<Color PropertyKey="borderColor" StartValue="#FF0000" EndValue="#666666" />
<FadeIn AnimationTarget="btnCloseParent" MaximumOpacity=".9" />
</Parallel>
</Sequence>
</OnClick>
</Animations>
</ajaxToolkit:AnimationExtender>
<ajaxToolkit:AnimationExtender id="CloseAnimation" runat="server" TargetControlID="btnClose">
<Animations>
<OnClick>
<Sequence AnimationTarget="info">
<%-- Shrink the info panel out of view --%>
<StyleAction Attribute="overflow" Value="hidden"/>
<Parallel Duration=".3" Fps="15">
<Scale ScaleFactor="0.05" Center="true" ScaleFont="true" FontUnit="px" />
<FadeOut />
</Parallel>
<%-- Reset the sample so it can be played again --%>
<StyleAction Attribute="display" Value="none"/>
<StyleAction Attribute="width" Value="250px"/>
<StyleAction Attribute="height" Value=""/>
<StyleAction Attribute="fontSize" Value="12px"/>
<OpacityAction AnimationTarget="btnCloseParent" Opacity="0" />
<%-- Enable the button so it can be played again
<Condition ConditionScript="$get('btnInfo') != null"></Condition>--%>
<EnableAction AnimationTarget="btnInfo" Enabled="true" />
</Sequence>
</OnClick>
<OnMouseOver>
<Color Duration=".2" PropertyKey="color" StartValue="#FFFFFF" EndValue="#FF0000" />
</OnMouseOver>
<OnMouseOut>
<Color Duration=".2" PropertyKey="color" StartValue="#FF0000" EndValue="#FFFFFF" />
</OnMouseOut>
</Animations>
</ajaxToolkit:AnimationExtender>
<!-- "Wire frame" div used to transition from the button to the info panel -->
<div id="flyout" style="display: none; overflow: hidden; z-index: 2; background-color: #FFFFFF; border: solid 1px #D0D0D0;"></div>
<!-- Info panel to be displayed as a flyout when the button is clicked -->
<div id="info" style="display: none; width: 250px; z-index: 2; opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); font-size: 12px; border: solid 1px #CCCCCC; background-color:#ffffff ; padding: 5px;">
<div id="btnCloseParent" style="float: right; opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);">
<asp:LinkButton id="btnClose" runat="server" OnClientClick="return false;" Text="X" ToolTip="Close"
Style="background-color: #666666; color: #FFFFFF; text-align: center; font-weight: bold; text-decoration: none; border: outset thin #FFFFFF; padding: 5px;" />
</div>
<div >
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Table runat="Server" ID="tblblurb">
<asp:TableRow>
<asp:TableCell>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</asp:TableCell>
<asp:TableCell>
<asp:Button ID="Button1" runat="server" Text="Button" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</td>
</tr>
<tr>
<td >
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="gvImages" runat="server" AllowPaging="True" onclick="" AutoGenerateColumns="False" OnPageIndexChanging="gvImages_PageIndexChanging" PageSize="1" GridLines="None" ShowHeader="False">
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<img src='../Handler.ashx?Size=S&ImageID=<%# Eval("ImageId") %>' style="cursor:hand"
onclick="javascript:PopOpen('<%#Eval("ImageId")%>');" alt='Thumbnail Photo of <%# Eval("ImageId") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td style="text-align:justify; vertical-align:top">
<%-- tblProfile.ProfileName, tblProfile.ProfileId, tblProfile.Age, tblProfile.Gender, tblProfile.MaritalStatus, tblHeight.HeightInch, tblHeight.HeightCm,
tblWeight.WeightKg, tblWeight.WeightLbs, tblEducationCategory.EducationName, tblProfile.StateName, tblCaste.CasteName,
tblReligion.ReligionName
--%>
<asp:Table runat="server" id="tblProfileDetails" width="400" >
<asp:TableRow ID="TableRow1" runat="server" >
<asp:TableCell ID="TableCell2" ColumnSpan="3" runat="server"><h5> <%# Eval("ProfileName") %> (<%# Eval("Age") %>yrs) </h5></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow2" runat="server" >
<asp:TableCell ID="TableCell4" runat="server"><%# Eval("MaritalStatus") %> </t> <%# Eval("Gender") %></asp:TableCell>
<asp:TableCell ID="TableCell18" runat="server"><%# Eval("EducationName") %> </t> <%# Eval("StateName") %></asp:TableCell>
<asp:TableCell ID="TableCell20" runat="server"><%# Eval("CasteName") %></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow4" runat="server" >
<asp:TableCell ID="TableCell14" runat="server"><%# Eval("WeightKg") %>kg/<%# Eval("WeightLbs") %>lbs</asp:TableCell>
<asp:TableCell ID="TableCell10" runat="server"><%# Eval("HeightInch") %>/<%# Eval("HeightCm") %>cm</asp:TableCell>
</asp:TableRow>
</asp:Table>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
|
|
|
|
|
I am new to ASP.NET, I am trying to debug ASP.NET application (C#).
I placed break point and excuting debuging verion from the VS,
but the control is not reaching any breaking point, atlease even Form_Load,page is getting
loaded completely.
Please advive
|
|
|
|
|
|
Did that , but now luck,,
And also tried
1. Open RegEdit
2. Browse to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
3. Add a dword under this key called TabProcGrowth
4. Set TabProcGrowth to 0
Additional to it you need to do this
1. Open Internet Explorer
2. Go to Tools->Internet Options
3. Switch to the Advanced tab
4. Uncheck 'Disable script debugging (internet explorer)'
But no luck
|
|
|
|
|
What is the location of you application ? is it from file System or IIS ?
|
|
|
|
|
no it is c:\somefolder, I tried placing it in othere locations /even desk top with out luck
|
|
|
|
|
Are you sure you're running a debug version of the application rather than a release version? Check the project properties.
|
|
|
|
|
Oh Yes , it is debug build, I am c++ programmer, new to asp.net
I may be missing a small thing, but not sure of what ? pls help me out
|
|
|
|
|
Honestly, this really shouldnt be hard. Running the asp.net app using Visual Studio's debug command should break on a breakpoint. There is nothing that needs "setting up" and certainly no registry hacks that need doing.
My advice is to start a very simple blank ASP.NET project with a single basic line of code in an otherwise empty page and try debugging that. ie, check that debugging is working and then attempt to work out what is different about your project.
|
|
|
|
|
Yes same problem with another simple application also, not breaking @ the break point,
I recently migated to vista. when I tried to install SP1, I got a msg that it is not requried.
hence I have n't intalled it.
before I was in w2k and I was, every thning is fine working with VC++. C# windows application
Debugging with C# Windows Application is working fine, BUt only problem with ASP.NET web applications.
modified on Tuesday, June 30, 2009 10:09 AM
|
|
|
|
|
Pals, I still face the same issue, Please advice me
|
|
|
|
|
Hi Guys
Using ASP.NET 2.0 and Ajax Toolkit I am developing an application
In that application i am using a radio button in data list
After Running its working fine
But the problem is that if i checked that radio button then we can not unchecked that radio button
so what will be the solution for that?
please help me
Thank in Advance
krishna veer singh
|
|
|
|
|
When you use radio button in GridView or DataList, then all the radio buttons will be selectable and not only one.
Though you have given a GroupName for the radio buttons, it will not work in GridView and DataList.
The reason is the GroupName will work if all the radio buttons in a group have the same 'Name' property.
But there will be distinct 'Name' will be generated for all radio buttons in the DataList/GridView.
Try the solution given in the following link:
Adding a GridView Column of Radio Buttons[^]
|
|
|
|