|
Click File Menu-> Open -> Web Site.
Then Click The File System icon and Choose the your File Folder.
|
|
|
|
|
Seems like you are new here. If you want to reply the vasini's post, you should click "reply" link under the vasini's post. Now, your post looks like replying Pete O'Hanlon's post.
|
|
|
|
|
|
Hello. This isn't a dating site you know.
|
|
|
|
|
But it *could* be....
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Go on then you smooth talker.
BTW - has the CD arrived yet?
|
|
|
|
|
"I am using MultiView / View controls which change by MenuItem clicks. Each view has a GridView on it with Edit and Insert features bound with <b>SqlDataSources</b>
The problem is: when the edit button is clicked, the GridView disappears and you need to click on the MenuItem again to see it (it happens evrytime you click edit, update, cancel or insert buttons on the GridView)."
Solution Suggested:
In Page_load -
if (!Page.IsPostBack){
//Getting the data from database
//Bind the data to Gridview
// Add this datasource to cache or session (e.g. Cache["mydata"]= dsProject.Table[0]; )
}
else{
//Re-bind the gridview with datasource from cache. (e.g. GridView1.DataSource = (DataTable)Cache["mydata"]
}
<u>To Michael Sync:</u> Hi Michael - the problem is Im using SqlDataSources with the GridViews not DataSets. If I want to change them - it will be lot of changes. Any other suggestions?
Thanks.
Ekjon
|
|
|
|
|
Member 4700225 wrote: To Michael Sync: Hi Michael - the problem is Im using SqlDataSources with the GridViews not DataSets. If I want to change them - it will be lot of changes. Any other suggestions?
1. Can you check whether the GV got disappeared or not without using MultiView Control? Just want to make sure what the problem is. I think it will work.
2. If your gridview works okay without multiview, it might be MultiView1.SetActiveView problem. Can you check whether your the EnableViewState property of MultiView and the views which are in MultiView are true or not. (Ensure that you have checked each and every views.)
|
|
|
|
|
Hi Michael,
In the MenuItems Click event handler, I did already set the ActiveViewIndex to the appropriate index depending on the MenuItem Click, so that should not be a problem. After I read your suggestions, I used SetActiveView instead of ActiveViewIndex. I did EnableViewState="true" for all of them, I even did EnableCaching="true" for the SqlDataSource. Everything works fine as they used to - Except the GridView disappears with edit, update, cancel, insert button clicks. You need to click on the MenuItem again to see it.
I was also thinking that its happening because of the MultiViews. But interestingly, even if I move my GridView out of the MultiView, still does the same. What a puzzle!!!
I am confident though that you can give me more clues!
Thanks so much.
Ekjon
|
|
|
|
|
First time here and I hope to get lucky
I have a really strange problem. My problem is that I can't add a DataGrid to a user control. When I have the code below in a control and register it in web.config it won't show up in the intellisense. If I comment out the DataGrid it works fine. The codebehind is empty.
I register the control in the web.config, but that shouldn't matter.
<code>
<![CDATA[<%@ Control Language="C#" AutoEventWireup="true" Codebehind="EBHObjectListFileControl.ascx.cs"
Inherits="EBHPresentation.Templates.Webcontrols.EBHObjectListFileControl" %>]]>
<asp:datagrid id="DataGridFileList" runat="server" onitemcommand="DataGridFileList_ItemCommand">
Font-Size="Small" ShowHeader="false" AutoGenerateColumns="false">
<columns>
<asp:boundcolumn datafield="Id" visible="false" />
<asp:boundcolumn datafield="FileName1" visible="false" />
<asp:boundcolumn datafield="Date" visible="true" />
<asp:templatecolumn>
<itemtemplate>
<asp:linkbutton id="LinkButtonOpenDocument" commandname="OpenFile" runat="server">
<%# DataBinder.Eval(Container.DataItem, "FileName2") %>
</asp:linkbutton>
</itemtemplate>
</asp:templatecolumn>
<asp:templatecolumn>
<itemtemplate>
<asp:imagebutton id="ImageButtonDocumentDelete" commandname="DeleteFile" runat="server">
ImageUrl="../images/delete.gif" OnClientClick="if(!confirm('message')) return;" />
</asp:imagebutton></itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
</code>
Thanks and regards,
--Tomas Jansson
|
|
|
|
|
mastoj wrote: < ![CDATA
Why did you add this?
mastoj wrote: The codebehind is empty.
The code-behind file should not be emply. (You are using ASP.NET 1x, right? )
At least, it should be something like that ~
namespace WebApplication3<br />
{<br />
using System;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Web;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.HtmlControls;<br />
<br />
public class WebUserControl1 : System.Web.UI.UserControl<br />
{<br />
protected System.Web.UI.WebControls.DataGrid DataGrid1;<br />
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
}<br />
<br />
#region Web Form Designer generated code<br />
override protected void OnInit(EventArgs e)<br />
{<br />
InitializeComponent();<br />
base.OnInit(e);<br />
}<br />
<br />
private void InitializeComponent()<br />
{<br />
this.Load += new System.EventHandler(this.Page_Load);<br />
<br />
}<br />
#endregion<br />
}<br />
}<br />
I think there are some wrongs in creating the user control. How did you create your usercontrol? What you should do is that just add the Web User Control in your project. Then, add the DataGrid to your user control. that's all you need.
mastoj wrote: I register the control in the web.config
Why do you need that?
|
|
|
|
|
Thanks for you reply.
Michael Sync wrote: < ![CDATA
Why did you add this?
I don't know why that was added, it was added when I added the code.
Michael Sync wrote: The code-behind file should not be emply. (You are using ASP.NET 1x, right? )
My bad, the code-behind is not totally empty. What I meant was that I haven't implemented any functionalty in the code-behind. I am using ASP.NET 2.0.
Michael Sync wrote: I think there are some wrongs in creating the user control. How did you create your usercontrol? What you should do is that just add the Web User Control in your project. Then, add the DataGrid to your user control. that's all you need.
That's exactly how I have created the user control. The thing is that it's the datagrid that is causing problem. If I copy the datagrid to a control that is working that control will disappear in the intellisense.
Michael Sync wrote: I register the control in the web.config
Why do you need that?
I register the control in the web.config instead of registering the control on every aspx page.
|
|
|
|
|
mastoj wrote: I don't know why that was added, it was added when I added the code.
Oh. you mean, codeproject error?
mastoj wrote: I am using ASP.NET 2.0.
I wonder why you used ASP.NET DataGrid (which is old) in ASP.NET 2.0 while there is new control "GridView" available.
mastoj wrote: f I copy the datagrid to a control that is working that control will disappear in the intellisense.
Sorry. I always use GridView in ASP.NET 2.0 project. So, you may also try to use it.
|
|
|
|
|
Michael Sync wrote: Oh. you mean, codeproject error?
I might be an codeproject error. The CDATA tag is probably used when storing the code-block.
Michael Sync wrote: I wonder why you used ASP.NET DataGrid (which is old) in ASP.NET 2.0 while there is new control "GridView" available.
I didn't know that the DataGrid control was old. I will try the GridView instead and see if that works.
Thanks
|
|
|
|
|
mastoj wrote: I might be an codeproject error.
No.. You are not an codeproject error? I was asking whether CDATA is automatically shown when you post your code in CP. (meaning CDATA doesn't actually exist in your code)
mastoj wrote: I didn't know that the DataGrid control was old.
Datagrid is the control that we used to use in ASP.NET 1x project.
mastoj wrote: I will try the GridView instead and see if that works.
All the best, buddy.
|
|
|
|
|
Hi,
How can we set hot key to a linkbutton in asp.net 2.0. I given the Accesskey. But it is not trigerring the linkbuttons's click event as button do. It only giving focus to the linkbutton. Is that anyting more to be done?
Thanks and regards,
Vincy
|
|
|
|
|
vincyjinoy wrote: It only giving focus to the linkbutton
Once you got the focus then you can just hit the enterkey to fire the click event.
If you don't like that way then you can use the Javascript to get the hotkey and fire the click event from client-side.
|
|
|
|
|
Hi all,
Iam using a radwindow from telerik to popup a window inorder to update records in a gridview.
After update iam using window.close() to close the popup and go to the main page. SOMETIMES iam receiving this message when i save
"to display the web page again, Internet Explorer needs to resend the information you've previously submitted"
with a retry and cancel buttons. If i press retry the main page reloads normally. This message is not always popping up.
Any ideas why and how to avoid seeing this message.
thanks in advance.
|
|
|
|
|
samerh wrote: Iam using a radwindow from telerik to popup a window
If you are using radwindow control then you should probably contact with their support team.
|
|
|
|
|
Yes this is correct but i did some search and found out that it is a common problem that many suffers even if not using rad controls. Iam asking for any info about this issue. Thanks again
|
|
|
|
|
samerh wrote: many suffers even if not using rad controls
Can you try with normal window popup? And let us know whether you got this error or not..
The way I understand about this error is that you got this when you try to refresh your page. So, maybe. your Rad control is refreshing its parent page when you close it.
|
|
|
|
|
I have tried it with normal window popup before but i have never faced this issue. However when i googled yesterday i found many developers facing the same issue with normal popup.
For rad popup, yes it is refreshing the main window and this is what i need, but upon refreshing that window the message appears. Through out my investigation for this issue, i read some articles saying that this is a normal act that the explorer do and this is a sort of security. They recommended using redirection (document.location.href) instaed of using window.close. This dont work in my case because i want to close the popup window and redirection keeps my popup open and redirect it and not close it and update the parent.
I know this is a bit crazy but i need a solution if there exists.
thanks for ur reply Michael.
|
|
|
|
|
Hi,
This is from Chandrakanth.
I would like to call a function which is in C#, From JavaScript.
How can i go for that?
Can any one give me repply for this.
Thanks And Regards
chandrakanth
Chandrakanth
|
|
|
|
|
Unfortunately, this isn't very straightforward - js runs in the browser on the client, the C# code on the server. To call anything on the server you'd need to use AJAX to make a call back to the server.
I tend to do this with a callbacks page - straight apsx page, no markup, and a big ol switch statement in page load, which looks for a querystring param which indicates the method in the callbacks file I wanna call...
C# has already designed away most of the tedium of C++.
|
|
|
|
|
document.getElementbyID("IDName").Click()
or
FireEvent
|
|
|
|