|
try this:
Clicking on button will close window.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Button1.Attributes.Add("OnClick", "self.close()")
End Sub
OR
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Write(" { self.close() }")
End Sub
|
|
|
|
|
Hello Tanweer,
Thank you for your response,
If we use this it works fine. But on button click event Excel file will be generated and pops up the open/save dialog. After the open/save dialog pops up, the main window should close. If we do not have this code, the attribute works fine without any issues.
The main issue is when we have Response... related code we could not close the main window.
Can you please give some idea to get rid of this?
Thank you in advance,
Raheem MA
|
|
|
|
|
Hi All ,
I want to add calender scheduler to integrate with my asp.net application is there any free scheduler available that i can integrate. i tried goggle it but with out any success.
thanks,
amit
|
|
|
|
|
|
|
Hi,
I want to display show times and the list of movies under it.
The display would be like this -
Show Time 6.30 PM
Movie 1
Movie 2
Movie 3
Show Time 9.30 PM
Movie 1
Movie 2
Movie 3
I want to display it in such a way that when I Click on "Show Time 6.30 PM" it would display the movies under that show and wont display anything under
"Show Time 9.30 PM". Now when I click on "Show Time 9.30 PM", all the contents inside "Show Time 6.30 PM" should shrink and the list of movies should be available
in "Show Time 9.30 PM".
I need some idea on how to do this, will it be achieved using a sliding panel, or is there any other control.
Note - For the show times and movie details I have a collection which I am binding it to a repaeter control.
Regards
Vinay
|
|
|
|
|
|
Hi,
I have tried using accordian but that`s not what i am trying to achieve here, please guide me If I am doing wrong.
If you look at the example given by me what I want is the Show Times 1 to shrink when Show Time 2 is clicked and display all the movies under show time 2.
I understand that under each Show Time there has to be panel, but my list is dynamic so I cannot manually set the number of panels. Can that be set from the code ?
What I am looking is for a SINGLE sliding panel which floats around every row in the table, So if Row 1 is clicked the panel displays the show times under it, when Row 2 is clicked, the data inside row 1 Is shrinked and the panel floats to down displaying the movies under Row 2.
Any Ideas?
Thanks
Vinay
|
|
|
|
|
How do I customise the behaviour of the asp:SiteMapPath to not show the root siteMapNode as a part of the breadcrumb.
<siteMapNode title="Root"…>
<siteMapNode title="Level_1_1"…>
</siteMapNode>
<siteMapNode title="Level_1_2"…>
<siteMapNode title="Level_2_1"…>
</siteMapNode>
</siteMapNode>
</siteMapNode>
Shold in the breadcrumb look like: Level_1_2 > Level_2_1
and not: Root > Level_1_2 > Level_2_1
_____________________________
...and justice for all
|
|
|
|
|
Place the following code in Global.asax:
void Application_Start(object sender, EventArgs e)
{
SiteMap.SiteMapResolve += new SiteMapResolveEventHandler(HideRootNode);
}
static SiteMapNode HideRootNode(Object sender, SiteMapResolveEventArgs e)
{
SiteMapNode node = SiteMap.CurrentNode.Clone();
SiteMapNode current = node;
SiteMapNode root = SiteMap.RootNode;
if (current != root)
{
while (node.ParentNode != root)
{
node.ParentNode = node.ParentNode.Clone();
node = node.ParentNode;
}
node.ParentNode = null;
}
return current;
}
|
|
|
|
|
Thanks,
This little css-hack also made it for me:
.PageHeading > a:first-child + span + span<br />
{<br />
display: none;<br />
}
_____________________________
...and justice for all
|
|
|
|
|
Please suggest some IEEE projects in ASP.NET
|
|
|
|
|
|
First I must say, that I'm rather a beginner with ASP.NET, so my question might be stupid. If it is, please spend some time to explain me why it's like this
Let's say I have a DropDownList bound to a collection of items of some type. For example this type:
public class Country
{
public int Id
{
get;
set;
}
public string Code
{
get;
set;
}
public string Name
{
get;
set;
}
}
On the aspx page I place a DropDownList like this (button is only for triggering postbacks):
<asp:DropDownList runat="server" ID="test" DataTextField="Name" DataValueField="Code" /><br />
<asp:Button runat="server" ID="temp" Text="Postback" />
And in the code-behind for aspx I write:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!IsPostBack)
{
test.DataSource = WebApplication2.Controls.CountriesDropDown.CountriesList();
DataBind();
}
}
(WebApplication2.Controls.CountriesDropDown.CountriesList() returns a Collection<country> instance)
And now, when I hit the postback button, on the server side I see the DataSource is null. However in the browser I can still see the countries displayed earlier.
Is there any way to have access to objects being bound, cause I don't want to generate the list again.
I didn't turn off ViewState (I found this suggestion when searching for solution)
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
lukasz_nowakowski wrote: if (!IsPostBack) { test.DataSource = WebApplication2.Controls.CountriesDropDown.CountriesList(); DataBind(); }
Change this to:
if (!IsPostBack)
{
test.DataSource = WebApplication2.Controls.CountriesDropDown.CountriesList();
test.DataBind();
}
|
|
|
|
|
Yeah... it is this way... I was writing this code from memory, not copied from Visual Studio. Sorry for mistake
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
I'm sending mail with excel attchment and it's working fine when I run it from my local
machine. but if I try to access it from another machine it's giving me this
Error:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Error coming on first line of below code
Microsoft.Office.Interop.Excel.Workbook aBook;
Microsoft.Office.Interop.Excel.Application ExlApp = new Microsoft.Office.Interop.Excel.Application();
i have given all rights (http://blog.crowe.co.nz/archive/2006/03/02/589.aspx[^]) still error is coming
please help me out as soon as possible
|
|
|
|
|
|
Don't cross post here. If anybody answers your previous question then you will be notified in your registered email.
|
|
|
|
|
Hi,
We might want to use Entity Framework 4 for a project. Everything that we need is in the context. We have a couple of guys working on this project, how do we all work on the model if it creates just 1 file?
Is it possible to add additional properties to a class that was created?
Also, how would I use classes that I have created already in my project? Lets say I have a User class and a User class that the EF creates, what now?
Thanks
|
|
|
|
|
Hi,
I have created one template in MsWord 2007 and placed ImagePlaceHolder1 in it.I am able to find and replace the text but how to find ImagePlaceHolder1 in that Word Doc and replace with the one i select in the combo.
At the end I want to save it in .pdf format as shown below.
object format = Word.WdSaveFormat.wdFormatPDF;
_wordapp.ActiveDocument.SaveAs(ref save, ref format, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing, ref _missing);
Want to submit this project today.
Any help is appreciated.
Thanks,
Harish
|
|
|
|
|
See the example in VB Code, How to find a imageplaceholder in the document
Selection.GoTo What:=wdGoToGraphic, Which:=wdGoToFirst, Count:=1, Name:=""
Selection.Find.ClearFormatting
With Selection.Find
.Text = "ImagePlaceHolder1"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Also this [link] might help you.
|
|
|
|
|
Instead of place holder i placed 'Sign1' Text in Word 2007 with this i tried your code to replace it with image but iam getting System.Drawing.Bitmap in .pdf while saving instead i should .jpg image
Below is my code
object[] Parameters;
Parameters = new object[15];
Parameters[0] = "Sign1";
Parameters[1] = _missing;
Parameters[2] = _missing; ;
Parameters[3] = _missing; ;
Parameters[4] = _missing; ;
Parameters[5] = _missing;
Parameters[6] = _missing;
Parameters[7] = _missing;
Parameters[8] = _missing;
Parameters[9] = img;
Parameters[10] = _missing;
Parameters[11] = _missing;
Parameters[12] = _missing;
Parameters[13] = _missing;
Parameters[14] = _missing;
myfind.GetType().InvokeMember("Execute", BindingFlags.InvokeMethod, null, myfind, Parameters);
I am getting from img = GetSignPath();//method used to
Clipboard.SetDataObject(img);
i am getting img from below mentioned code inside GetSignPath();
MemoryStream ms = new MemoryStream((byte[])ds.Tables[0].Rows[0]["SignatureImage"]);
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
imgPath = "C:\\" + comboempname.Text + ".JPG".Trim();
img.Save(imgPath);
//return imgPath;
return img;
Any Help is Appreciated
Thanks,
Harish
|
|
|
|
|
dears,i am using vs2005 web application.
one image information in hex format is like as follows.
000125262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A73740D0A
my requirement is this hex data need to store in sql db and need to display in a website.
can anybdy help me to solve my problem??
In sql i inserted this data in an image coloumn like as follows(added ox).
INSERT INTO [Test_mm].[dbo].[PictureTable]
([Title]
,[DateAdded]
,[MIMEType]
,[Image])
VALUES
('jjj'
,'6/22/2010 3:12:04 PM'
,'hjhg'
,0x000125262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A73740D0A)
after inserting the data i tried to display this using the code below.But the picture box is coming with a red colour cross button?
Dim ImageID As Integer = Convert.ToInt32(Request.QueryString("ImageID"))
Using myConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("NorthwindConnection").ConnectionString)
Const SQL As String = "SELECT [MIMEType], [Image] FROM [PictureTable] WHERE [ImageID] = @ImageID"
Dim myCommand As New SqlCommand(SQL, myConnection)
myCommand.Parameters.AddWithValue("@ImageID", ImageID)
myConnection.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader
If myReader.Read Then
Response.ContentType = myReader("MIMEType").ToString()
Response.BinaryWrite(myReader("Image"))
End If
myReader.Close()
myConnection.Close()
End Using
can anybdy help me to solve this ?i am troubling lot..pls pls help me
MEENU
|
|
|
|
|
Okay, here is my problem: I've got a web site that allows users to edit their profile. Part of this profile information will be used to populate a contact page which will include a picture of the user. Now, I'm able to upload the pictures just fine into a sql 2005 database and display that image, but if the user doesn't add an image (which they are allow not to do) then I get stuck on how to populate that into my sql stored procedure's parameter list. I keep getting an error every time I try saving the profile without an image in the file upload box. Here is the code that I am using to try to put in a dbnull value:
cmd.Parameters.AddWithValue("@picture", SqlDbType.Image).Value = DBNull.Value
Any ideas on what I'm doing wrong?
|
|
|
|