|
|
i want to create a custom Control in Asp.net by using C# please tell me how can i create it and use it in other applications plz???????????????????????????????????
Regards,
AbuBakar
|
|
|
|
|
Try googling it[^]. You'll get loads of results
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Hello !
I am showing images in Datagrid by using Picturebox,it is working well,Now I want to call some events like pictureBox1_Click and pictureBox1_MouseMove events of picturebox control but i don't know how can i do it?? please send me solution as soon as possible i will be really grateful to u...........
Regards,
AbuBakar
AbuBakar
|
|
|
|
|
Hi,
It is very simple.
If you are creating the PictureBox at design time then u can just go to the
Properties window -> events tab and select the event that u want to handle
If you are creating them dynamically in the code then
just declare the events and define the methods which will handle the events
Regards,
Pramod
|
|
|
|
|
Hello!
I've an UserControl with a MenuStrip control on it. In a derived control I cannot add additional menu items to this menustrip (in the visual designer).
Is there any advise to solve this problem!?
|
|
|
|
|
|
Just put the string in the javascript code.
Example:
var str = '<asp:Literal id="MyString" runat="server"/>';
MyString.Text = aString.Replace("\\","\\\\").Replace("'","\\'");
---
b { font-weight: normal; }
-- modified at 4:52 Monday 12th December, 2005
|
|
|
|
|
MyString and aString, c# string or Javascript string?
I have a url string (named urlString)in c#, and I want to use it in the window.open function in Javascript?
|
|
|
|
|
All the code didn't show up in the post. Check it now.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I have created a user control with Checkbox attached to the textbox. As a control, enabling/ disabling checkbox will enable/disable textbox and I can set bool values to Checkbox and string value to the textbox.
I have added this control to the DataGrid to alll exiting rows and column. To refresh the values to the user I have override Refresh mothod.
But now the problem is, even if I change the value for any cell, it is updaing same value for all cells where the control is placed. So is it possible to change the value of single cell?
Regards,
Mandar
|
|
|
|
|
Hi,
I have developed a C# windows application. But I have a problem with the screen resolution. When the sreen resolution changes form size is also change.
Do you know any method to keep the form size fixed for different resolutions.
Thanks
Good Luck
|
|
|
|
|
Set the minimum and maximum size of the form to be the same as the size you want
hope that helped!
GanDad
|
|
|
|
|
How to make a CheckBoxList that scrolls on a web forms (inside a given size window for example) page?
|
|
|
|
|
Hi friends,
Am having a grid with TextBoxColumn in it..There a combo is placed for selecting the value for the textboxcolumn...
My Grid looks more like a table in the design view of MS Access..
Similarly,there are 3 columns ..one for FieldName,sec for Datatype and third for description...
In Access,when we select the datatype from the dropdown list and move to the next row,the datatype wont change even if we move through various rows up and down..
In my appln,after selecting and moving to the next row,and again back to the prev row(to tht part col),the selected text in the combo changes to that row(tht col) from which v r moving..
Kindly help me...
Thanx...
|
|
|
|
|
Hi All,
the follow code will be run normally in WindowsApplication:
string userName = "a";
string userPass = "a";
string address = "192.168.18.145";
int port = 8080;
WebProxy myproxy = new WebProxy(address , port);
NetworkCredential credentials = new NetworkCredential(userName, userPass, null);
myproxy.Credentials = credentials;
WebRequest rqt = WebRequest.Create(this.textBox2.Text.Trim());
rqt.Proxy = myproxy;
rqt.PreAuthenticate = true;
WebResponse rsp = rqt.GetResponse();
System.IO.Stream stream = rsp.GetResponseStream();
System.IO.StreamReader reader = new System.IO.StreamReader(stream);
this.textBox1.Text = reader.ReadToEnd();
stream.Close();
reader.Close();
but in the SmartDeviceApplication,,it will cause the problem :
The response did not contain an end of entity mark.
Can you tell me why and how to solve the problem??
Thank you !!
|
|
|
|
|
Kindly help me...
Thanx...
is it the bug ?????
22
|
|
|
|
|
Have anyone no how to use how to use Build Comment Web Pages Dialog Box in c#
|
|
|
|
|
I have an MDI parent form "formMAIN" with the following code:
public formMAIN()<br />
{<br />
InitializeComponent();<br />
LoginForm loginForm = new LoginForm();<br />
loginForm.ShowDialog();<br />
<br />
if (LoggedUserName != "")<br />
{<br />
this.Text += " [" + LoggedUserName + "]";<br />
}<br />
else<br />
{<br />
}<br />
...
The loginForm connects to the database, checks for matching user name and password and sets the formMAIN's static variable "LoggedUserName" if a match is found. I placed it in the constructor of formMAIN so that it would appear first.
I want to be able to close this main form immediately if the user closes the login form or clicks the "cancel" button on it... IE.. LoggedUserName will be blank when the focus returns to the formMAIN.
I tried "this.Close();" as well as Application.Close(), but it doesn't work. I'm guessing this is because it's in the constructor for the form, which obviously is not yet completely instantiated. I can't put it in the initialize area for the same reason.
I need some way to automatically perform the this.Close() operation 'after' the formMAIN completes initialization if the LoggedUserName value is still "" (IE.. failed log-in or user canceled the login form). How can this be done with the least amount of code?
Flicktom
-- modified at 0:23 Monday 12th December, 2005
|
|
|
|
|
Try calling
Environment.Exit(1);
WARNING: I'm not sure if this is the right way to do it, but it seems to do the job. You might want to see if somebody else comes up with a better solution.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
This solution worked great. Thanks.
|
|
|
|
|
Try putting your code into the form's Load() event instead.
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
|
Isn't an ocx a COM control ? If so, you can reference it using COM.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Right click on the "Toolbox | Windows Forms" and select Add/Remove Items.
Select the COM Components tab at the top. If the activeX is registered on the system it will be in the list. Select it and you will find it in the Toolbox list.
|
|
|
|