|
Hi,
You can write the code as follows for DataList's ItemDataBound event.
private void DataList1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)<br />
{<br />
DataRowView drv = (DataRowView)e.Item.DataItem;<br />
if(e.Item.ItemType != ListItemType.Header && e.Item.ItemType != ListItemType.Footer && e.Item.ItemType != ListItemType.Pager)<br />
{ <br />
if(drv!=null && e.Item.ItemType != ListItemType.EditItem)<br />
{<br />
LinkButton btn = (LinkButton)e.Item.FindControl("ButtonName");<br />
if(null!=btn)<br />
btn.Attributes.Add("onClick", "window.location='PopUp.aspx';");<br />
}<br />
}<br />
}
Sandip Kansara
Software Engineer
India.
|
|
|
|
|
Hi sandip.
thanks 4 ur advice.
i have done it another way.
now i have other problem.
suppose i have 5 linkbutton and i want to open 5 popup window.
my problem is that when i click 1st button, one popup window will be open but when i click 2nd btn then second popup reload on 1st popup window.
plz give me solution
thanks again
khan
|
|
|
|
|
hi
guys can you please let me know one thing , when the user closes the browser
it's session dosen't finish and it's session finishes after the specified interval of time defined, so if the user opens the browser again before the session tine interval has finished will the user gets the same session or new session, please reply ASAP,thankx for ur reply.
regards.
|
|
|
|
|
That depends on the browser, and if there are other browser windows open.
Internet Explorer allows for separate instances of the browser to be running, and each instance have it's own session. If you re-open a window in the same instance, you will get the same session. If you open a new instance, you will get a new session.
Firefox only runs one instance. Unless you have closed all browser windows, you will still be in the same session if you re-open a window.
If you have closed all browser windows and starts the browser again, it will be a new instance of the browser, and it will get a new session.
---
Year happy = new Year(2007);
|
|
|
|
|
hai friends,
I am an asp.net(c#) programmer.i need your help..in my project i want to generate a pdf document almost i worked out but i couldn't insert images into my pdf document..pls help me...i am waiting for your valuable reply...
alex.
|
|
|
|
|
I have some basic data for stock items that need to be shown in a GridView. I don't know how the data will be presented yet but I think it will be an object with methods to get the data out so the data I need to bind will be several rows of several columns. If I know how many columns I need how can I best bind this data to the GridView?
So I might have this:
String color = "Blue", quantity = "5", cost = "5", total = "25";
I then want to add this row to my datagrid. How do I tell the datagrid it should have 4 columns and to add the row above?
Thx for looking
|
|
|
|
|
how to move the panel during running time in asp.net.
|
|
|
|
|
Sounds like you need to research javascript.
|
|
|
|
|
I have a gridview on an AJAX update pannel.
When the user clicks different buttons the GridViews DataSource changes the stored procedure it uses to query the table.
Is there a way to make the gridview autogenerate its columns anew when the datasource changes? as the qeuries differ from one another in only a couple of columns.
OR do I have to manauly add and remove all the columns needed after I have changed the stored procedure the DataSource for the GridView will use?
|
|
|
|
|
Hello,
I have a menu element on my page, all of it items have the specified CssClass,
but when I create a class for links and visited link in .css menu items also inherit
these styles . Please tell me where I should set the font color to prevent this.
My .css
For menu
.Menu
{
font-family: Arial;
font-size: 14px;
font-weight:bold;
color: #000000;
background-color: #FFFFFF;
}
.MenuDynamicHoverStyle
{
background-color: Gray;
color: #FFFFFF;
}
.MenuDynamicMenuStyle
{
background-color: #FFFFFF;
color: #000000;
}
.MenuDynamicSelectedStyle
{
background-color:Gray;
font-family:Arial;
font-weight: bold;
font-size: 14px;
color: #E0E0E0;
}
.MenuDynamicMenuItemStyle
{
background-color:#FAFAFA;
border-color: #E0E0E0;
border-width: 0.1em;
border-style: solid;
font-family:Arial;
font-size: 12px;
font-weight: bold;
color: #000000;
}
.MenuStaticSelectedStyle
{
background-color: #FFFFFF;
color: #FFFFFF;
}
.MenuStaticHoverStyle
{
background-color:#FFFFFF;
color: #000000;
}
For links
A:visited
{
color: Gray;
}
A:link
{
color: #EF3123;
}
Thanks.
|
|
|
|
|
Sir,
I have created a windows forms control in which I put a DSO Framer control. I have compiled it and registered in GAC. Even
its doing fine when I used it in another windows application. But When I try to put it in a web page its not showing anything
as it is the same thing showing the required word doc in windows application.
Please tell me what are the steps do I need to take to make it fine. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
You are asking the same question over and over. I've made some suggestions and you've not responded. Did you take my advice, and it didn't work out for you, or are you still hoping that by doing what didn't work yesterday, over and over, it will start to work just through the passage of time ?
This project was ill advised from day one, as I said to you. Your best bet at this stage, is to go to a contract job site, and offer to pay someone to fix it for you. I don't see how anyone can tell you how to fix it without seeing your code, and spending some time working through the issues.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
No christian you are misunderstanding me, some mistake has been done by me. It is because I couldnt find my question. It was directly going to the last months question. If you want me to delete it I will do it so. But I feel sorry. Unfortunately it happened I am sorry.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Christian shall I give you the code :
1. I put the DSO Framer control in win forms control named as "DSOControl", in that usercontrol_load event,
I put this code 'AxFramerControl1.Open("D:\Aleem\Codes.doc")'.
2. Then I compiled it, registered and installed it in GAC the steps are as follows.
i. Regasm D:\Aleem\DSOControl\Bin\DSOControl.dll
ii. Iladasm /out=[asm file] /unicode D:\Aleem\DSOControl\Bin\DSOControl.dll
iii.Created strong name key pair.
iv. Ilasm /key=[Key file] /dll /out=[dll file] [asmfile]
v. gacutil -i D:\Aleem\DSOControl\bin\DSOControl.dll.
Its giving that assembly installed successfully. Is it mean that my assembly has become a global accessible asmbly? Ok?
3. Now by using references I added this to my Windows application. Its working perfectly. It is showing the specified file in that win appl. I didnt write any code here.
4. Now the same DSOControl.dll file I have referenced from my Web pplication. And to add it on my web form I used obect tag, mentioned its classId as = "http:DSOControl.dll#DSOControl.UserControl1". Its not working.
5. Even I put that dll file in the root directory of this web application. And referred it using htpp and even Console path. Could you please tell me what could be my mistake. Please, I would be very very very...... Thankful to you, please.
Regards,
-- modified at 7:14 Friday 19th January, 2007
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi everyone,i'm using GridView for display some details,so i need to allow user's to edit the data GridView it self,so how can i do that using RowCommand Event or is there any easy way to that?,i'm using StoredProcedure for that editing also.
thank you.
|
|
|
|
|
Put the different controls in GridView and in Row command event you will the row index and you can update query for the same.
|
|
|
|
|
I didnt get u freind, can u some explain coding for me
Thanks
|
|
|
|
|
I have used checkbox u can use any control in the same way.
Try the following:
<asp:GridView ID="GridViewForm" DataKeyNames="FormID" runat="server" AutoGenerateColumns="False" Width="100%">
<Columns>
<asp:BoundField DataField="FormID" HeaderText="FormID" Visible=False />
<asp:BoundField DataField="FormName" HeaderText="Form Name">
<ItemStyle HorizontalAlign="Left" Width="150px" />
</asp:BoundField>
<asp:TemplateField HeaderText="Add">
<ItemStyle HorizontalAlign="Center" Width="50px" />
<HeaderStyle Width="70px" />
<ItemTemplate>
<asp:CheckBox ID="chkAdd" runat="server" AutoPostBack=true OnCheckedChanged="chkAdd_Changed"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
On Row Command:
Protected Sub GridViewForm_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridViewForm.RowCommand
Dim gvRow As GridViewRow
For Each gvRow In GridViewForm.Rows
If gvRow.RowType = ListItemType.Item Or gvRow.RowType = ListItemType.AlternatingItem Then
If CType(GridViewForm.FindControl("chkAdd"), CheckBox).Checked Then
CType(GridViewForm.FindControl("chkView"), CheckBox).Checked = True
Else
CType(GridViewForm.FindControl("chkView"), CheckBox).Checked = True
End If
End If
Next
End Sub
Hope this helps u,if not then do reply...
|
|
|
|
|
Thnks freind,i have set the edit thing in gridview in different way,that is i use EditItemIndex into -1 and i check it and i put my primary key into DataKeyField,i need according my ID update the data into database,how can i do that.
|
|
|
|
|
U can write the update query on Row Command event of GridView.
|
|
|
|
|
GridView in SmartTag have option allow editing, you should add column CommandField Edit,Update,Cancel
Also you should specify in SqlDataSource in Update stored procedure.
After that in the grid will appear column with link button Edit. Click it and data in columns with ReadOnly=false will be displayed in textbox.
|
|
|
|
|
Can we access session in custom control.
means if use customer control in web application then that web application session access in custom control.
If yes, then how we can do this ..plz send me code.
-- modified at 3:01 Friday 19th January, 2007
|
|
|
|
|
I have a web application. It has a folder named "data" under the project dir. My web application
creates files in "data" folder. I know in order to create file in "data" folder, aspnet should have permission. For that we have to go to property of the web application folder. There under the tab Security ,press Add button.A form appears Write aspnet to the textbox and press ok.
Then press checkbox to give full control to aspnet user.
It works fine when developing.
My problem is : when I create a web installation package of that application and install it to my
client computer, I have to repeat above procedure.
Is there any way to assign aspnet user full control of the folder "data" ?
I mean without repeating above procedure, could I dynamically/programmatically assign full access over the "data" folder to aspnet user?
Any information is highly appreciated?
Thanks for you valuable comments.
prakash
|
|
|
|
|
There are a couple of options that you can use in a custom action to set the permission to a folder for the ASPNET account:
+ Use the tool cacls.exe
+ Use the DirectorySecurity class.
+ Use WMI.
|
|
|
|
|
Hi
Am using a control of type as 'button' in my web page.
How to make it invisible during page load?
I couldnt find any attribute to make its visibility to 'False'.
Please help me
-- modified at 1:12 Friday 19th January, 2007
|
|
|
|