|
Hi, try this code
<asp:gridview id="grdIDCODE" runat="server" autogeneratecolumns="false">
<columns>
<asp:templatefield headertext="IDCode">
<itemtemplate>
<asp:hyperlink id="lnkID" runat="server" text='<# Eval("[ColumnField]") &>'OnDataBinding="lnkIDCode_DataBinding">
</asp:hyperlink>
</itemtemplate>
</asp:templatefield>
</columns>
</asp:gridview>
Hope this one can help.
Thanks
|
|
|
|
|
Hi Thank u for your help..
i cant undstand code 'OnDataBinding="lnkIDCode_DataBinding">
I want to give the navigateurl and text from the database
can i give like this??
asp:hyperlink id="lnkID" runat="server"text='<# Eval("[ColumnField]") &>´ navigateurl='<# Eval("[ColumnField1]") &>
|
|
|
|
|
How to use garbage colloection when using crystal report. because every after one day ot two crystal reports stops displaying and starts throwing errors.
Ashish Jha
Software Engineer
|
|
|
|
|
ReportDoc is the Report Document Object.
on page unload
ReportDoc.Close()
ReportDoc.Dispose()
GC.Collect()
i think you mean this.
|
|
|
|
|
Hi All,
I'm using ajax modal popup in my application. Following are the steps which I wrote to call modalpopup
1. Add User Control as an modal pop up (DeletePopUp.ascx)
2. In aspx page calling ajax extender (Support.aspx) through panel
2.a) In side Panel1 calling user control
<asp:panel id="Panel1" runat="server" cssclass="modalBox" xmlns:asp="#unknown">
<asp:updatepanel id="updPerson" runat="server" childrenastriggers="false" updatemode="Conditional">
<contenttemplate>
<asp:button id="btnCancelPerson" runat="server" causesvalidation="false" text="X">
CssClass="FlowRight" BackColor="Transparent" />
<uc:deletepop id="DeletePop" runat="server" xmlns:uc="#unknown">
2 b) Calling Ajax modal pop up in same page
<ajaxtoolkit:modalpopupextender id="ModalPopupExtender1" runat="server" xmlns:ajaxtoolkit="#unknown">
TargetControlID="changePwdTitle" PopupControlID="Panel1" BackgroundCssClass="modalBackground"
Drag="true" OnCancelScript="Cancel()" CancelControlID="btnCancelPerson"/>
3. Css class (Corporation.css)
.modalBackground {
background-color: Gray;
filter: alpha(opacity=50);
opacity: 0.5;
}
.modalBox
{
background-color : #f5f5f5;
border-width: 3px;
border-style: solid;
border-color: Blue;
padding: 3px;
width: 250px;
}
It's working fine in Mozilla browser but not supporting IE(any version). In IE Popup come on top and the parent page content go down. It breaks whole page.
I'm using .net 2008 and css2.1.
Please help me to come up from this solution.
Waiting for positive reply....it's very urgent
Thanks in advance
Ashwini
|
|
|
|
|
Hello , I m updating my existing web application using AJAx, I updated my pages with scriptmanager and update panel and webconfig too.
But when i run my project and click on any button page is not refreshing but in statusbar progress bar is displayed same when page is refreshed.
I want to do pure ajax on my page. What i have to do?
Please help me.
thanks in advance.
|
|
|
|
|
Hi, you must input a trigger code in your update panel.
<trigger>
<asy.... controlid="button1">
</trigger>
Thanks
|
|
|
|
|
hi;
I am not able to have update panel do a partial post back.Page is refreshed each time when selected index changed.
Can any one please tell me , what am I missing ?
<pre><table class="style1">
<tr>
<td class="style2">
enter your name</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<tr>
<td class="style2">
select any one</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem>a</asp:ListItem>
<asp:ListItem>b</asp:ListItem>
<asp:ListItem>c</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style2">
your select is</td>
<td>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
</table>
</pre>
my code behind is
<pre>Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
Label1.Text = DropDownList1.SelectedItem.Text
End Sub
</pre>
<div class="ForumMod">modified on Thursday, April 23, 2009 2:20 AM</div>
|
|
|
|
|
Hi, I think change your tr to table tag inside of your updatepanel
<td>
<asp:updatepanel id="UpdatePanel1" runat="server">
<contenttemplate>
<table>
<tr>
<td class="style2">
select any one</td>
<td>
<asp:dropdownlist id="DropDownList1" runat="server" autopostback="True">
<asp:listitem>a</asp:listitem>
<asp:listitem>b</asp:listitem>
<asp:listitem>c</asp:listitem>
</asp:dropdownlist>
</td>
</tr>
<tr>
<td class="style2">
your select is</td>
<td>
<asp:label id="Label1" runat="server" text="Label"></asp:label>
</td>
</tr>
</table>
</contenttemplate>
</asp:updatepanel>
</td>
Hope this one can help
Thanks
|
|
|
|
|
Hi;
Thanks for reply.It works if i put entire table into update panel.but not working i keep another table outside updatepanel.Here is my code
<table class="style1">
<tr>
<td class="style2">
enter your name</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table class="style1">
<tr>
<td class="style2">
select any one</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem>a</asp:ListItem>
<asp:ListItem>b</asp:ListItem>
<asp:ListItem>c</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style2">
your select is</td>
<td>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</tr>
</table>
|
|
|
|
|
Hi, you must have trigger
like this
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="DropDownList1" />
</Triggers>
</asp:UpdatePanel>
Thanks
|
|
|
|
|
Hi,
I have a datalist with a button in it. I want to display this button when Advance user logins and make the button invisible when simple user logins. So I want to make the button in the Datalist invisible dynamically. Please tell me how I can acess a button in a datalist to my code. Please reply me if you know any solution to solve this.
Thanks in advance.
|
|
|
|
|
for(int i=0;i<datalist1.items.count;i++)>
DataList1.Items[i].FindControl("Button1").Visible = false;
Hope this wil do...
|
|
|
|
|
u can write the code inside datalist_Itemcreated event
if session(USerNAme) = "super" then
DataList1.Items[i].FindControl("Button1").Visible = true;
else
DataList1.Items[i].FindControl("Button1").Visible = false;
endif
hope this code will work....
kannak
|
|
|
|
|
iam using asp.net 1.1 in which i request an another page and sending response using request.responseXML.documentElement
when i am sending the xml <sale><table><sno>1</sno><sno>2</sno></table></sale>
it works fine
but when i am sending the response like
<sale><table><sno>1</sno><sno>2</sno></table><t2><name>abc</name><name>xyz</name></t2></sale>
it gives error.
i dont know whr i m wrong.
Er. Jagwinder Singh
modified on Thursday, April 23, 2009 1:12 AM
|
|
|
|
|
Nonu Walia wrote: but when i am sending the response like
12
abcxyz
it gives error.
what is the error?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
error is null
when i check response using alert it gives null
e.g
alert(response);
Er. Jagwinder Singh
|
|
|
|
|
I have two user controls. The first user control starts a table with one row with 3 columns and starts a second row and starts the second cell. The second user control ends what the first control started.
I place the first user control on a page, then I add say a list box and finally add the second user control. The outcome of this is the Top, bottom and sides of the table are predefined in the user controls.
Now my problem... The listbox is not visible. I think it is hidden behind the user control.
When I View Source the tables appear to be correct. Does anyone have any ideas why the listbox does not appear?
Here is the code:
Top User Control "PanelTop1"
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="PanelTop.ascx.vb" Inherits="UserControls_Panels_PanelTop" %>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="PanelTopLeft" width="14px">
<asp:Image ID="Image1" Height="1px" Width="14px" runat="server" />
</td>
<td class="PanelTopFill" width="100%">
</td>
<td class="PanelTopClose" width="41px">
<asp:Image ID="Image3" Height="1px" Width="41px" runat="server" />
</td>
<td class="PanelTopRight" width="23px">
<asp:Image ID="Image2" Height="1px" Width="23px" runat="server" />
</td>
</tr>
<tr>
<td class="PanelLeftFill">
</td>
<td colspan="2" >
Bottom User Control "PanelBottom1"
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="PanelBottom.ascx.vb"
Inherits="UserControls_Panels_PanelBottom" %>
</td>
<td class="PanelRightFill">
</td>
</tr>
<tr>
<td class="PanelBottomLeft">
</td>
<td colspan="2" class="PanelBottomFill">
</td>
<td class="PanelBottomRight">
</td>
</tr>
</table>
Page Usage:
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="3">
<uc2:PanelTop ID="PanelTop1" runat="server" />
<table class="PanelTable">
<tr>
<td>
<asp:ListBox ID="ListBox22" Visible="true" AutoPostBack="true" Rows="20" Width="100%"
runat="server" BackColor="#FF0066"></asp:ListBox>
</td>
</tr>
</table>
<uc3:PanelBottom ID="PanelBottom1" runat="server" />
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
|
|
|
|
|
I want to say I found the problem but the truth is I removed the table around the list box and it worked!
I replaced the table and it still worked! I don't know what the problem was but it is fixed now.
|
|
|
|
|
Hey folks,
I need to build an application that does some local file manipulation (editing, copying, etc.) on the behalf of the user.
How restrictive is ASP in terms of client side machine access?
I could just write a client-server app instead, but seems like that would take bit more effort.
Thx
NIK
|
|
|
|
|
nicknotyet wrote: How restrictive is ASP in terms of client side machine access?
All you need is to give the asp user account permission to the folder where the files are located. It is that simple.
[edit] my bad. I did not read OP post completely. There is no way you can access the client machine from asp.net [/edit]
modified on Thursday, April 23, 2009 9:32 AM
|
|
|
|
|
Really!!!
So I can just use something like
string path = "C:\\MyFiles\SomeFile.Txt";
File.OpenText(path);
...
in code behind?
|
|
|
|
|
No. Actually, ASP/ASP.NET will not have any access to the client's computer drives at all. I think only an ActiveX control might be able to access client files. Doing what you wrote would open SomeFile.Txt in the C:\\MyFiles directory of the server.
Scott
|
|
|
|
|
One Yes and One No - I am well confused.
|
|
|
|
|
nicknotyet wrote: One Yes and One No - I am well confused.
my bad. I have to read your post again. scottgp is right, you can not access client machine from asp.net. I read your post as you want to access server files.
The only way you can access client machines is through explicit permission of the use and other technologies such as activex.
sorry of the confusion, I take my earlier post back
|
|
|
|