 |

|
when you are binding the values from any source, create another alias in your selection query.
ex: select fullname,left(fullname,20) as shortname from tablename
the 20 mentioned can be of your need.and then bind the shortname to literal.it works.
|
|
|
|

|
The findcontrol event is not getting the control e.g. "btnSubmit" placed inside a gridview itemtemplate tag.
please help with code in VB.NET
|
|
|
|

|
<ItemTemplate>
<asp:CheckBox ID="chkItemSelect" runat="server" />
<asp:Label ID="lblname" Text='<%#Bind("name")%>' runat="server" />
<asp:Button ID="btnFindx" runat="server" CommandName="Findx" Text="Do Some thing" CommandArgument='<%#Eval("ID")%>'></asp:Button>
</ItemTemplate>
So, in event OnRowCommand(Code Behind) :
Protected Sub GridView_RowCommand(sender As [Object], e As GridViewCommandEventArgs)
Select Case e.CommandName
Case "Findx"
MethodFindControlValue()
Exit Select
End Select
End Sub
..in MethodFindControlValue() :
Private Sub MethodFindControlValue()
For Each row As GridViewRow In ApprovalGrid.Rows
Dim chkItemSelect As CheckBox = CType(row.FindControl("chkItemSelect"), CheckBox)
Dim chkItemSelect As Label = CType(row.FindControl("lblname"), CheckBox)
Dim id As String = Convert.ToString(NameGridView.DataKeys(row.RowIndex).Value.ToString())
Next
End Sub
hope this help you............
|
|
|
|

|
paste the code what you have done till now?..so that we can help you in correcting the errors.
|
|
|
|

|
Thanks for the help dear!
but my case was solved as I used the LINK BUTTON instead of button in the itemtemplate tag of Gridview
|
|
|
|

|
ok...sure...enjoy coding...all the best..
|
|
|
|

|
How to track emails whether the receiver has read the message and reply us in asp.net...
|
|
|
|

|
I am using this to redirect to comment page:
Response.Redirect(String.Format("~/{0}/Comment/{1}", Page.RouteData.Values["ADDRESS"], Page.RouteData.Values["GUID"]), false);
I want, if the user is not signed in to redirect to /signin but with mentioning the original page so when user signs ij it will automatically redirect to the original page. something like:
if (Session["volow_member_id"] == null || Session["volow_member_guid"] == null)
{
Response.Redirect("~/Signin/" + String.Format("~/{0}/Comment/{1}", Page.RouteData.Values["ADDRESS"], Page.RouteData.Values["GUID"]), false);
}
else
{
Response.Redirect(String.Format("~/{0}/Comment/{1}", Page.RouteData.Values["ADDRESS"], Page.RouteData.Values["GUID"]), false);
}
how can i do this?
Technology News @ www.JassimRahma.com
|
|
|
|

|
Put your return url into the query string and after login check if you have return url query then to that url or redirect to default page
?ruturnur=your urllllllllllll
Parwej Ahamad
|
|
|
|

|
but my signin url is :
mydomain.com/signin
and the redirect url is:
mydomain.com/myprofile/comment/post-guid-string
so the full url would be something like this (because I am usilg url route mapping):
mydomain.com/signin/www.mydomain.com/myprofile/comment/post-guid-string
which is invalid!
Technology News @ www.JassimRahma.com
|
|
|
|

|
No Url will be:
mydomain.com/signin/?returnurl=www.mydomain.com/myprofile/comment/post-guid-string
Parwej Ahamad
|
|
|
|

|
protected void Page_Init(object sender, EventArgs e)
{
Response.Redirect("~/yourpage.aspx");
}
|
|
|
|

|
How to add KML file to google Map using GGeoXml in javascript in asp.net
|
|
|
|

|
I tried using oledbconnection with excel and exported data into it but it doesn't support on 64bit.
In 32bit it works well.
But in 64bit it works partially.
Can you give me any solution...
|
|
|
|

|
Redirect/open window to pageListForExportExcel.aspx in page1.aspx
so in page1 set input button to redirect/open window to pageListForExportExcel.aspx
in page1 :
<input type="button" value="Export to Excel" onclick="ExportToExcel()"/>
and you need javascript or JQuery for create function redirect/open window to pageListForExportExcel.aspx
<script type="text/javascript">
function ExportToExcel()
{
var txt = window.open("pageListForExportExcel.aspx");
}
</script>
in ASPX (pageListForExportExcel.aspx), use repeater for display you data from datatable,Example set to be this :
<%@ Page Language="C#" AutoEventWireup="true" EnableSessionState="ReadOnly" EnableViewState="false" CodeBehind="BukuInduk_exportToExcel.aspx.cs" Inherits="LimSys.Web.Laporan.BukuInduk_exportToExcel" %>
<asp:Repeater ID="rep1" runat="server">
<HeaderTemplate>
<table border=1>
<tr>
<td>NAME</td>
<td>ADDRESS</td>
<td>TELP</td>
<td>GENDER</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%# Eval("name")%></td>
<td><%# Eval("address")%></td>
<td><%# Eval("telp")%></td>
<td><%# Eval("gender")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
and the last,in code behind pageListForExportExcel.aspx.cs
use this :
protected void Page_Load(object sender, EventArgs e)
{
Response.Clear(); Response.Buffer = true; Response.ContentType = "application/vnd.ms-excel";
var process = new DataLayersCollections(); var list = process.GetListFromDataTable(); rep1.DataSource = list;
rep1.DataBind();
}
and the latter again .......
good luck ....
hope this help you.....
|
|
|
|

|
Hi,
I would like to ask which way you prefer to get a button in ASP.NET project? Button or ImageButton?
Technology News @ www.JassimRahma.com
|
|
|
|

|
You use buttons because it's faster and easier, just apply a css style to them.
You use image buttons to obtain a certain look and feel for an app, or for something that cant be described by words.
In more advanced cases, you use span tags with css style, or images and bind them to an event in Javascript or Jquery.
|
|
|
|

|
hi
Has anyone got a good sample code on Google Translate V2 using vb.net? Thanks
|
|
|
|
|

|
Hi world !
I have this php code for unzipping file in server host.
<?php
$zip = new ZipArchive;
$res = $zip->open('6.zip');
if ($res === TRUE) {
$path = pathinfo(realpath('6.zip'), PATHINFO_DIRNAME);
$zip->extractTo($path);
$zip->close();
echo 'ok';
unlink('UnzipViaPhp.php');
} else {
echo 'failed';
}
?>
So now i wanna ASP.NET code for unzipping the file on server host .(Something like the php one).
|
|
|
|
|

|
thanks for solution . but none of them worked on Host. cause its on internet and doesnt worked !
|
|
|
|

|
Hi,
Why I am getting object reference not set to an instance of an object with the following MapPageRoute?
I guess it's because of {ADDRESS} at the beginning without a name like Page/{ADDRESS{ but how can I solve it. I already sent all the three lines at the end of the MapPageRoute but still having the same problem, keep in mind the problem occuers only in the PostComment.aspx
<pre lang="cs">routes.MapPageRoute("volow_member_channel_post", "{ADDRESS}/{GUID}", "~/Post.aspx");
routes.MapPageRoute("volow_channel_home", "{ADDRESS}", "~/ChannelHome.aspx");
routes.MapPageRoute("volow_member_post_comment", "{ADDRESS}/Comment/{GUID}", "~/PostComment.aspx");</pre>
Technology News @ www.JassimRahma.com
|
|
|
|

|
Can you reframe your question and your post is not looking proper. Please correct it.
|
|
|
|

|
Jassim Rahma wrote: object reference not set to an instance of an object You should understand that this error means that you are using a reference that does not refer to anything, i.e. the reference is null or not initialised. In your code your are using the reference routes so it is reasonable to guess that routes has not been set up correctly, or has been corrupted.
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
i am using visual studio 2008. there is no nested master page template in add new item--> template list
|
|
|
|
|
|

|
Hi All,
I am going through a strange problem. I have an asp.net 3.5 application which is consuming a .Net Remoting application, and few web services. The problem is the ASP.Net web application runs for quite a while and after running for few days and then stops running. Specially it runs up to Friday evening, but when we come on Monday morning and test it. It doesn't run. And when I compile the application and host it again, it starts running perfectly. Still application is in testing environment.
But very I am scared, because I dont know what is wrong with it. Sometimes I found some of the web services are not running. But some times its not the case. The web services are running correctly, and when I compile the application and host it. It runs good. Is it the case if we are consuming remoting components or web services.
I want to understand what could be the reason. Any body any kind of help any link or any help is very very thankful.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|

|
Hi Abdul,
What is the overall configuration of IIS ? As you said, on Friday evening, have you noticed any over request on your web site ?
|
|
|
|

|
Hi Abhijit,
There is no over request, there is no request at all from friday evening to Monday morning.
I am looking in to IIS configuration, can you please advise me some thing like which part of IIS configuration I should look in to.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|

|
I am using this to route the channel home to show as:
www.mydomain.com/channeladdress
routes.MapPageRoute("volow_channel_home", "{ADDRESS}", "~/ChannelHome.aspx");
I want to know how can I use MapPageRoute to show it instead like this:
channeladdress.mydomain.com
Technology News @ www.JassimRahma.com
|
|
|
|

|
That's a server name like www.MyDomain.com
You just makes another website in IIS and use the host header channelAddress
channeladdress.mydomain.com
|
|
|
|

|
I want to publish files to a virtual directory when i build the project.
Is it possible?
|
|
|
|

|
No. You have to publish it separately. It's a two step process. First build it and then publish it either manually or using publish option present in VS for the project.
|
|
|
|

|
Hi All,
I am using eGRC Archer tool which is developed in Asp.net.
In this tool we are having already developed applications.
There is a em-build feature of exporting records to PDF and RTF format. Whenever we export any record which contains images, Images are not being displayed on PDF or RTF while images are visible on webpage. Can anybody suggest that is there any setting in IIS or in WebConfig file so that images can be exported. Your suggestions are appreciated.
Thanks in advance.
Regards,
Ashutosh Dixit
|
|
|
|

|
Well that's because images are embedded inside pdf files.
I think when you create a pdf, you have to use the physical location of the file, and not the virtual location, in order to embed the image. That should of been in the instructions for your pdf generator.
|
|
|
|

|
Hi,
I would like to ask is it possible to create Google Analytics site in my existing Google Analytics account using ASP.NET and C#?
Technology News @ www.JassimRahma.com
|
|
|
|

|
Perhaps it's me, but I can't really make head-nor-tails of your question: it doesn't seem to make any sense. Do you mean that you want to add Google analytics to an asp.net website? If so, it is fairly easy: there is lots of help on the web. Search here for articles or on Google.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|

|
I try to disable Pop-up Blocker of web browsers.
Is there any way to Disable/Enable the pop-up Blocker programmatically ?
Please help us regarding of above problem.
|
|
|
|

|
no. The popup blocker was written for cross domain popups for advertising. A website owner would enter a line of script on there website, and a ad would popup. Today, they are modal popups instead.
All you can do on the client side is take measurements of the browser viewport, and change the elements in the DOM, or read a cookie.
|
|
|
|

|
If you could do that then there would be no point in having such a feature.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|

|
Ding Dong - I should of said that!
I didn't think of it that way at the moment.
|
|
|
|

|
i cant select master page as well as place code n seperate file textbox in vs 2008. it is apearing while making website bt donst display while creating web app
mahi_p
|
|
|
|

|
Your question is not clear. We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Please edit your question and provide better information.
|
|
|
|

|
In the page, you build it like a regular webpage with the header and footer, and in the middle, you place a content placeholder object, a container that will hold that space in the seperate file you created.
Master page
<%@ Master Language="VB" CodeFile="en-us_store.master.vb" Inherits="masterpages_store" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link rel="shortcut icon" href="/favIcon.ico" />
</head>
<body>
<form id="form1" runat="server">
<div id="DefaultHeader_Wrapper_III">
<asp:ContentPlaceHolder ID="SiteMap" runat="server">
<!- This is a blank container - leave it emtpy -->
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
default.aspx - reference the container in the master page in your content page, and content below will be injected into the master page.
<asp:Content ID="Content3" ContentPlaceHolderID="SiteMap" runat="server">
<!-- Encode the Sitemap Content of the Page -->
<div class="sitemap_container">
Some content such as words or pictures in your seperate file
</div>
</asp:Content>
|
|
|
|

|
I have to develop my Final Year project which is Email Moderation Engine. It will be fully functional Email Domain like Yahoo, Gmail or Hotmail but it will be with my desired domain name, it also contains a SMS alert functionality so users can get alerts on there cell phones against emails received. Kindly help me out and let me know how should i start the project. I will be developing this project is ASP.NET so i need some start-up tips.
Regards
Ziad
|
|
|
|
|

|
Thanks Richard.
In Visual Studio what will the best option to develop my project?
ASP.NET Web Application?
|
|
|
|
 |