|
Not to mention that most exe protectors don't work on .NET apps.
--
Joel Lucsy
|
|
|
|
|
Hello everyone. It's me again, and on my project teh user is suppose to press a button, and then when the post back occurs I check what the user entered in in the dynamic text box, and if it is less than a certain number it should put a different number that is valid in. Let's say the user enters in 10, but the minimum number to enter in is 15, it should put that number in the text box. I tried Request.Form.Set() but that is apparently read-only so that did not work. Thanks.
Sincerely,
The Major Rager
|
|
|
|
|
Are you having trouble checking the value? If so, use the RangeValidator class, you can set the control for it to validate, maximum value and minimum value. If the value of the text box is outside the range, you can set the value of the text box to the minimum. I would do this in the page_load section in an if block "if (Page.IsPostBack)"
ex
if ( Page.IsPostBack )
{
rangevalidator.ControlToValidate = "textbox1";
rangevalidator.MaximumValue = "100";
rangevalidator.MinimumValue = "15";
if ( rangevalidator.IsValid )
{
// do your thing
}
else
{
textbox1.Text = "15";
rangevalidator.ErrorMessage = "whatever you want to tell the user";
}
}
|
|
|
|
|
Hi, thanks for replying to my message. I actually used this
<br />
<br />
((TextBox)(Page.FindControl(identity)));<br />
<br />
where identity was the name of the text box
and I was able to get and cast the control as a text box
and then manipulate the data in it. Thanks a lot for replying however!
Sincerely,
The Major Rager
|
|
|
|
|
I wanted to do some TAPI programming. I want to make applications like answering machines, phne recorders, etc. How do i go about this? Is there some kind of TAPI class in .NET, else where should I look for information to get me started?
|
|
|
|
|
Mridang Agarwal wrote: I wanted to do some TAPI programming. I want to make applications like answering machines, phne recorders, etc. How do i go about this? Is there some kind of TAPI class in .NET, else where should I look for information to get me started?
There is no TAPI class in .NET.
Your best bet is this here[^].
TAPI and .NET aren't the best of bed-fellows. The Tapi3 COM object has problems when used via COM Interop. I still prefer to write C++ COM objects that do the telephony interaction via TAPI 2
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
How can i display three state checkboxes in a treeview. When I set the Checkboxes property to True in a treeview, i get a two state checkbox next to each item. But what i was looking for was a three state checkbox?
|
|
|
|
|
Winform labels, buttons, etc don't respond to the normal/large/extra large font settings that can be specified in display properties. Is there an easy way to do an appwide detection+change at runtime for accescibility purposes? I realize the bigger fonts will make things "interesting" regarding layout in places, but if simply detecting and doing the font change is a major effort the other problem is a moot point.
|
|
|
|
|
I have a problem with very long string value. How i can store it in variable and operate it? Thanks
Nothing
|
|
|
|
|
You can theoretically store billions of chars in a string, unless you have several gig of ram though performance will be an issue though. What do you mean by "operate it"?
|
|
|
|
|
Hi all,
Can I convert a string into code?
For egs. if I have textbox with the text:
"DataSet1.Tables[0].Rows[0][0].ToString()"
I want to convert it to code..
I must say that I want to use objects that the application creates, so the object ICodeCompiler cannot help me..
Is there a way of doing it...???
Thanks
RoyRose
|
|
|
|
|
What do you mean "I want to convert it to code"? If you want to dynamically create objects and methods in IL on the fly it is possible but far from a trivial task.
I would also suggest that allowing your application to blindly execute instructions from any data source is a best a bad design pattern and at worst a huge security risk.
|
|
|
|
|
unless he wants to include some sort of command interpreter in his application.
but that would be another subject.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hey Tom,
I'll tell you exactly what I mean.
I want to have a control (like label) that the Text property is a code that refers to table field plus other manipulation, for example
label.text = "Day(Orders.OrderDate)"
will get the name of the day the customer bought a product...
OR
label.text = "Age(table["customer"].Row["BirthDate"])"
Age is a function that gets a dateTime and returns the age...
It's very similar to script code.
I can manipulate only the current row.
I won't be able to change the DB just to show it.
I use other databinded labels, when I walk throught the rows, the label's data change & also the expression-labels suppose to change...
|
|
|
|
|
You know, I would almost recommend writing that kind of manipulation into the database itself instead of trying to pull it to the client to reinterpt. Or if you are doing more of a report kind of thing you might want to look into making the database return Xml so you can apply an Xslt. Or heck why not look into buying any number of the software advertised here to do this kind of thing.
|
|
|
|
|
Hi
Does anyone have any suggestions on the best way to convert a large C# solution to perform case insensitive string comparisons throughout?
Ideally, i would have hoped that this would be a compiler option.
Cheers
Rich
|
|
|
|
|
There's no compiler option that I can think of. You need to either create a string class ( can you even derive from 'string' ? ) or write your own comparison function, obviously in both cases, you need to change a lot of code by hand ( the string class would allow a global search and replace, at least ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The string class contains a static method for doing case-insensitive matches. String.Compare( str1, str2, true );
How you'd apply that gloabally for your project, don't know. Maybe as been suggested, make your own class that replaces the ==.
--
Joel Lucsy
|
|
|
|
|
Thanks for the replies. Looks like a derived class is the way to go. It would be a really useful compiler option.
|
|
|
|
|
|
Hi There,
I have developed an Add in / bolt on architecture in our existing VB6 app that allows .Net objects to be loaded/hosted and I have been able to debug the .Net code by loading the .Net project, setting a break point on the code that will be called by the VB6 app, then attaching to the VB6 apps process using VS.net.
I have also done the same using C# as both the host and the add in.
In both of the above cases it involves opening the add in project and attaching to the main project's/applications process using VS.Net.
PS: You also need the PDB file to tie the source to the Exe/dll.
Hope this helps.
DL.
MCSD(VB6/SQL7)
MCAD(C#/SQL2000)
MCSD(C#/SQL2000)
|
|
|
|
|
Try adding the project for the plugin as a sub-project of your solution for the application that loads the plugin.
--
Joel Lucsy
|
|
|
|
|
Hi all,
I have written a basic proxy in C# to log and control Interent access on a LAN. the problem is that this doesnt work if i dont have a gateway address in the LAN card IP details. what i would like to do is have the proxy intercept the request on port 80 (or other ports) then it forwards the request to the gateway.
cause if i leave the gateway address in the NIC details then users can just remove the proxy from browser config and they still got access to Internet.
can anyone give me the right direction to acheive this please ?
kind regards,
g00fy
|
|
|
|
|
Can't you make your gateway inaccessible from the client computers? That way, they'd be forced to connect through your proxy.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
i really need more sleep before posting,
that is exactly what i want to do, i was looking for a way to redirect the packet using c# code, but i just realised that all i need is another socket to the router.
thanx for your reply
im going to sleep now
|
|
|
|