|
You cannot do that from server side, as you dont have access to the clients browser settings.
A possible - nearly - solution would be to use javascript (and windows.open) like described in
this thread. But, like mentioned there, the
user can prohibit hiding bars in different browsers. And it will certainly not look like a windows form.
Another possibility is to use divs/panels - which look like windows forms - and make use of the ajaxcontroltoolkit (and the popup-extender controls etc.) to open/close these divs/panels. For
the user it "feels" like an seperate window/page then, even if it isnt. There are also some rich (and free) java ui kits out there, which provide these kind of "windows" functionality. The advantage is that
popup blockers dont block these "popups" because they arent popups..But it is certainly more difficult
to get dynamic content working in these szenarios.
Check componentone.com for an commercial example (window control in asp.net suite).
|
|
|
|
|
|
I guess this is a popup window opened using javascript this way. This was also described in the
link i gave you in the last post. You can use client-side scripting to modify the page appearance.
|
|
|
|
|
In javascript use the open method to create a new window that contains Sample.htm. The new window is 200 pixels by 400 pixels and has no status bar, no toolbar, no menu bar, or address field.Please check the following example:
window.open("Sample.htm",null,
"height=200,width=400,status=no,toolbar=no,menubar=no,location=no");
|
|
|
|
|
Ok, thanks, i solved my problem.
|
|
|
|
|
Hi koncuk,
I have similar problem. Can you please post the trick which solved your problem?
Thanks in adavance.
Please let me know the solution.
|
|
|
|
|
I ADDED THE template field in grid view using above link
but i am not able to read the data from the template field in a grid.
Thanks and regards,
Amit PAtel
|
|
|
|
|
Amit Patel1985 wrote: I ADDED THE template field in grid view using above link
I didnt find any link
Amit Patel1985 wrote: but i am not able to read the data from the template field in a grid.
How are you trying, in which method.
Can you put your code snippet?
|
|
|
|
|
You have missed the link
What does it mean ' am not able to read the data from the template field '? Did you get any error? exception ?? or anything ? Unless you provide any information how could people help you ??
Thanks,
Arindam D Tewary
|
|
|
|
|
we have a set of images to be displayed in order so v have put a table and used to specify image inspite of giving proper width height the image is being showed in a very large size that it is very difficult to view.
How to make it fit to our size?
I am giving my coding for reference if any error please tell me
<asp:tablerow id="TableRow9" horizontalalign="Center" verticalalign="Middle" runat="server">
<asp:tablecell id="TableCell10" horizontalalign="Center" verticalalign="Middle" runat="server">
<asp:image id="Image7" runat="server" imagealign="Middle">
|
|
|
|
|
If you want to fix the size of image then, there is a Height & Width properties in asp:Image control which you can set like
<asp:image id="Image7" runat="server" height="100px" widht="100px" imagealign="Middle">
Hope the help.
|
|
|
|
|
Inspite of specifying the height and width it is being seen in a large view that is the problem.
|
|
|
|
|
since u suggested i had tried <asp:image id="Image7" runat="server" imagealign="Middle" height="100px" width="100px">
after specifying this the image itself is invisible
|
|
|
|
|
thank you for your help It worked
|
|
|
|
|
give the height and width of Image control
|
|
|
|
|
Hi,
I have an editformtemplate in a grid. The edit form contains 2 radiobuttons along with other controls. During itemdatabound , i convert the values of this column in grid to yes/no. Now on itemdatabound , when the form goes into edit mode i want to get the yes/no value and after converting to true/false want to populate radiobuttons. I am having problem retrieving the Cell data from the grid in edit mode. The exception is:
Telerik.Web.UI.GridNotSupportedException: Item in insert mode does implement indexer only when the edit form is autogenerated at Telerik.Web.UI.GridEditFormInsertItem.get_Item(String columnUniqueName)
Code:
'ItemDatabound code snippet
Select Case e.Item.ItemType
Case Telerik.Web.UI.GridItemType.Item, GridItemType.AlternatingItem
Dim item As Telerik.Web.UI.GridDataItem = e.Item
'display Yes/No instead of flag 1,0
If CType(item("IsNewProduct").Text, Boolean) = False Then
item("IsNewProduct").Text = "NO"
Else
item("IsNewProduct").Text = "YES"
End If
Case GridItemType.EditFormItem 'inside template edit form
If e.Item.IsInEditMode Then
'populate controsl on template edit form
Dim item As Telerik.Web.UI.GridEditableItem = e.Item
Dim editFormItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
'Below line throws error, i am trying to retrieve yes, no and chose the correct radiobutton accordingly
Dim IsNewProductValue As String = CType(item("IsNewProduct").Text, String)
'Exception is : Telerik.Web.UI.GridNotSupportedException: Item in insert mode does implement indexer only
' when the edit form is autogenerated at Telerik.Web.UI.GridEditFormInsertItem.get_Item(String columnUniqueName)
i have tried setting item as
Dim editFormItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
Dim item As Telerik.Web.UI.GridEditableItem = Ctype(editFormItem.ParentItem,GridDataItem)
but this also didnt work
Please provide help in this regard. Thanks ...
Regards
|
|
|
|
|
|
|
GoAzure wrote: Learn Windows Azure at your own pace
How someone is going to learn anything about azure in 1 week, at their own pace ?
|
|
|
|
|
There are rumors that there will be additional Azure Boot Camps in the near future so if you need more time to learn then get another free token from a future Boot Camp.
|
|
|
|
|
Free Windows Azure pass via Virtual Boot Camp III starting May 3rd
After the huge success of the Windows Azure Virtual Boot Camp I and II, here comes…
Virtual Boot Camp III Learn Windows Azure at your own pace, in your own time and without travel headaches.
Windows Azure one week pass is provided so you can put Windows Azure and SQL Azure through their paces.
NO credit card required. You can start the Boot Camp any time during May 3rd and May 10th and work at your own pace.
The Windows Azure virtual boot camp pass is valid from 5am USA PST May 3rd through 6pm USA PST May 10th
More information at http://blogs.technet.com/webtech/archive/2010/04/26/windows-azure-one-week-virtual-boot-camp.aspx
modified on Monday, May 3, 2010 6:22 PM
|
|
|
|
|
Hello,
I have written a page that accepts new information and then repopulates the page when a button is clicked. This is a simple task in C#, but seems very complicated in ASP.net. The code seems to work fine on the first click, but the after the first click, the page no longer repopulates. Closer examination reveals that although the values are changed on the page, the actual values held in memory remain the same; ergo, new results are the same as the old. Now...I see that on some controls (such as RadioButton) there is an automatic postback feature, however, I cannot find this for a button. Of course, I am presuming that the Postback is the problem....OR... perhaps it's something else? My preference is not to use javascript, but I of course will if that is the only way. I am still amazed that (after all this time) ASP still has to rely on Javascript for certain features. Any ideas both welcomed and appreciated.
Thank You, Pat
|
|
|
|
|
Show us your Page_Load function.
|
|
|
|
|
Dave,
Thank you for your reply. I have pasted the Page_Load info below. This page is brought up from a click event on another page's GridView and is supposed to populate information accordingly.
protected void Page_Load(object sender, EventArgs e)
{
medDate = CreateMedicalDate(medDate);
id = Request.QueryString["Id"];
Screening_Number = Request.QueryString["Screening_Number"];
Site_Number = Request.QueryString["Site_Number"];
Version_Id = Request.QueryString["Version_Id"];
Version = Request.QueryString["Version"];
AE = Request.QueryString["Ae"];
Serious = Request.QueryString["Serious"];
GetLastVersion();
SqlConnection Conn = new SqlConnection(CONNSTR);
try
{
string Sql = "SELECT [Id],[Period] , [Screening_Number] , [Site_Number] , " +
"[Version_Id],[Version] , [Ae] , [Frequency] , [Visit] , [VisitNumber] , [Date_Onset] , " +
"[Ongoing] , [Date_Ended] , [CTCAE] , [Serious] , [Related] , [Action] , [Outcome] , " +
"[NewConMedsY], [NewConMedsN], [SubBy] , [SubOn] , [Sae_Rpt_Status] " +
"FROM Adverse_Events WHERE [Version_Id] = @Version_Id AND [Version] = @LastVersion ";
SqlCommand Comm = new SqlCommand(Sql, Conn);
Comm.CommandType = CommandType.Text;
Comm.Parameters.Clear();
Comm.Parameters.AddWithValue("@Version_Id", Version_Id);
Comm.Parameters.AddWithValue("@LastVersion", lastCompletedVersion);
SqlDataAdapter da = new SqlDataAdapter(Comm);
DataSet ds = new DataSet();
da.Fill(ds);
LabelPeriod.Text = ds.Tables[0].Rows[0]["Period"].ToString();
LabelScreeningNumber.Text = ds.Tables[0].Rows[0]["Screening_Number"].ToString();
LabelVersion.Text = ds.Tables[0].Rows[0]["Version"].ToString();
LabelId.Text = ds.Tables[0].Rows[0]["Id"].ToString();
LabelAe.Text = ds.Tables[0].Rows[0]["Ae"].ToString();
LabelFrequency.Text = ds.Tables[0].Rows[0]["Frequency"].ToString();
LabelVisit.Text = ds.Tables[0].Rows[0]["Visit"].ToString();
LabelVisitNum.Text = ds.Tables[0].Rows[0]["VisitNumber"].ToString();
LabelDateStarted.Text = ds.Tables[0].Rows[0]["Date_Onset"].ToString();
LabelOngoing.Text = ds.Tables[0].Rows[0]["Ongoing"].ToString();
LabelDateStopped.Text = ds.Tables[0].Rows[0]["Date_Ended"].ToString();
LabelCtcae.Text = ds.Tables[0].Rows[0]["CTCAE"].ToString();
LabelSerious.Text = ds.Tables[0].Rows[0]["Serious"].ToString();
LabelRelated.Text = ds.Tables[0].Rows[0]["Related"].ToString();
LabelAction.Text = ds.Tables[0].Rows[0]["Action"].ToString();
LabelOutcome.Text = ds.Tables[0].Rows[0]["Outcome"].ToString();
RadioButtonConMedY.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["NewConMedsY"].ToString());
RadioButtonConMedN.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["NewConMedsN"].ToString());
LabelSubBy.Text = Session["Name"].ToString();
LabelSubOn.Text = medDate;
}
catch (Exception ex)
{
Console.WriteLine("Error : " + ex.Message);
}
SetDateDropdownBoxes();
}
There is a button on the page that is supposed to decrement a value in the LabelVersion label and re run the Sql thereby re populating the page with new information. As I said, it works on the first click, but not afterwards. Thanks for your attention. Best, Pat
|
|
|
|
|
And where is the button click event? Without checking for IsPostback all this will do is repopulate the controls from the database and overwrite the value you expect.
I would refactor this code to extract the all the SQL lookup code to a method so It can be called from multiple places in your code. Such as from the PageLoad event and from the button click handler
I know the language. I've read a book. - _Madmatt
|
|
|
|